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

@ -339,6 +339,21 @@ bool ParallelScavengeHeap::is_in_reserved(const void* p) const {
return false;
}
bool ParallelScavengeHeap::is_scavengable(const void* addr) {
return is_in_young((oop)addr);
}
#ifdef ASSERT
// Don't implement this by using is_in_young(). This method is used
// in some cases to check that is_in_young() is correct.
bool ParallelScavengeHeap::is_in_partial_collection(const void *p) {
assert(is_in_reserved(p) || p == NULL,
"Does not work if address is non-null and outside of the heap");
// The order of the generations is perm (low addr), old, young (high addr)
return p >= old_gen()->reserved().end();
}
#endif
// There are two levels of allocation policy here.
//
// When an allocation request fails, the requesting thread must invoke a VM