RFR(s): 8178363: Incorrect check for nmethod re-registration in C1

Per Liden per.liden at oracle.com
Mon Apr 10 07:05:45 UTC 2017


Hi,

When an nmethod is compiled, it's registered with the heap if 
ScavengeRootsInCode is non-zero (which it always is). However, during 
code patching in C1 we re-register the nmethod with the heap only if it 
also has scavengable oops. This additional requirement is only valid for 
calls to CodeCache::add_scavenge_root_nmethod(), and not for 
CollectedHeap::register_nmethod(). This happens to work today since G1's 
is_scavengable() basically always returns true.

Bug: https://bugs.openjdk.java.net/browse/JDK-8178363
Webrev: http://cr.openjdk.java.net/~pliden/8178363/webrev.0/
Testing: jprt

cheers,
Per


More information about the hotspot-gc-dev mailing list