7041789: 30% perf regression with c2/arm following 7017732

Implement a more accurate is_scavengable()

Reviewed-by: stefank, jcoomes, ysr
This commit is contained in:
Jon Masamitsu 2011-05-03 10:30:34 -07:00
parent 8cdd97938c
commit 6819e3739e
12 changed files with 132 additions and 36 deletions

View file

@ -51,7 +51,12 @@ inline void ParallelScavengeHeap::invoke_full_gc(bool maximum_compaction)
}
inline bool ParallelScavengeHeap::is_in_young(oop p) {
return young_gen()->is_in_reserved(p);
// Assumes the the old gen address range is lower than that of the young gen.
const void* loc = (void*) p;
bool result = ((HeapWord*)p) >= young_gen()->reserved().start();
assert(result == young_gen()->is_in_reserved(p),
err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, (void*)p));
return result;
}
inline bool ParallelScavengeHeap::is_in_old_or_perm(oop p) {