mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
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:
parent
8cdd97938c
commit
6819e3739e
12 changed files with 132 additions and 36 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue