Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_interface/collectedHeap.hpp @ 3377:2aa9ddbb9e60
7041789: 30% perf regression with c2/arm following 7017732
Summary: Implement a more accurate is_scavengable()
Reviewed-by: stefank, jcoomes, ysr
author | jmasa |
---|---|
date | Tue, 03 May 2011 10:30:34 -0700 |
parents | f95d63e2154a |
children | 6747fd0512e0 |
comparison
equal
deleted
inserted
replaced
3373:688202ef6306 | 3377:2aa9ddbb9e60 |
---|---|
267 // NOTE: this actually returns true if "p" is in reserved space | 267 // NOTE: this actually returns true if "p" is in reserved space |
268 // for the space not that it is actually allocated (i.e. in committed | 268 // for the space not that it is actually allocated (i.e. in committed |
269 // space). If you need the more conservative answer use is_permanent(). | 269 // space). If you need the more conservative answer use is_permanent(). |
270 virtual bool is_in_permanent(const void *p) const = 0; | 270 virtual bool is_in_permanent(const void *p) const = 0; |
271 | 271 |
272 | |
273 #ifdef ASSERT | |
274 // Returns true if "p" is in the part of the | |
275 // heap being collected. | |
276 virtual bool is_in_partial_collection(const void *p) = 0; | |
277 #endif | |
278 | |
272 bool is_in_permanent_or_null(const void *p) const { | 279 bool is_in_permanent_or_null(const void *p) const { |
273 return p == NULL || is_in_permanent(p); | 280 return p == NULL || is_in_permanent(p); |
274 } | 281 } |
275 | 282 |
276 // Returns "TRUE" if "p" is in the committed area of "permanent" data. | 283 // Returns "TRUE" if "p" is in the committed area of "permanent" data. |
282 return p == NULL || is_permanent(p); | 289 return p == NULL || is_permanent(p); |
283 } | 290 } |
284 | 291 |
285 // An object is scavengable if its location may move during a scavenge. | 292 // An object is scavengable if its location may move during a scavenge. |
286 // (A scavenge is a GC which is not a full GC.) | 293 // (A scavenge is a GC which is not a full GC.) |
287 // Currently, this just means it is not perm (and not null). | 294 virtual bool is_scavengable(const void *p) = 0; |
288 // This could change if we rethink what's in perm-gen. | |
289 bool is_scavengable(const void *p) const { | |
290 return !is_in_permanent_or_null(p); | |
291 } | |
292 | 295 |
293 // Returns "TRUE" if "p" is a method oop in the | 296 // Returns "TRUE" if "p" is a method oop in the |
294 // current heap, with high probability. This predicate | 297 // current heap, with high probability. This predicate |
295 // is not stable, in general. | 298 // is not stable, in general. |
296 bool is_valid_method(oop p) const; | 299 bool is_valid_method(oop p) const; |