Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp @ 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 | 336d17dff7cc |
children | 6747fd0512e0 |
comparison
equal
deleted
inserted
replaced
3373:688202ef6306 | 3377:2aa9ddbb9e60 |
---|---|
336 return true; | 336 return true; |
337 } | 337 } |
338 | 338 |
339 return false; | 339 return false; |
340 } | 340 } |
341 | |
342 bool ParallelScavengeHeap::is_scavengable(const void* addr) { | |
343 return is_in_young((oop)addr); | |
344 } | |
345 | |
346 #ifdef ASSERT | |
347 // Don't implement this by using is_in_young(). This method is used | |
348 // in some cases to check that is_in_young() is correct. | |
349 bool ParallelScavengeHeap::is_in_partial_collection(const void *p) { | |
350 assert(is_in_reserved(p) || p == NULL, | |
351 "Does not work if address is non-null and outside of the heap"); | |
352 // The order of the generations is perm (low addr), old, young (high addr) | |
353 return p >= old_gen()->reserved().end(); | |
354 } | |
355 #endif | |
341 | 356 |
342 // There are two levels of allocation policy here. | 357 // There are two levels of allocation policy here. |
343 // | 358 // |
344 // When an allocation request fails, the requesting thread must invoke a VM | 359 // When an allocation request fails, the requesting thread must invoke a VM |
345 // operation, transfer control to the VM thread, and await the results of a | 360 // operation, transfer control to the VM thread, and await the results of a |