RFR(s): 8046231: G1: Code root location ... from nmethod ... not in strong code roots for region

Per Liden per.liden at oracle.com
Wed Jun 18 12:35:16 UTC 2014


On 06/17/2014 10:29 PM, Jon Masamitsu wrote:
> On 6/17/2014 5:12 AM, Per Liden wrote:
>> Could I please have this fix reviewed.
>> Summary: nmethods are only registered with the heap if
>> nmethod::detect_scavenge_root_oops() returns true. However, in case
>> the nmethod only contains oops to humongous objects
>> detect_scavenge_root_oops() will return false and the nmethod will not
>> be registered. This will later cause heap verification to fail.
>> There are several ways in which this can be fixed. One alternative is
>> to adjust the verification to ignore humongous oops (since these
>> objects will never move). Another alternative is to just register the
>> method regardless of what detect_scavenge_root_oops() says. Since we
>> might want to allow humongous objects to move in the future this is
>> the proposed fix.
> Per,
> Do you have any measurements on how many more nmethods get registered
> with this approach (registering an nmethod regardless return from
> detect_scavenge_root_oops()?

I don't have any numbers, but I'm fairly confident that it's a small 
number. The only nmethods that weren't registered before this change 
were methods in classes loaded by the BootClassLoader, which only had 
humongous oops in them. All methods loaded by a SystemClassLoader would 
have been registered anyway.


> Jon
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8046231
>> Webrev: http://cr.openjdk.java.net/~pliden/8046231/webrev.0/
>> Testing:
>> * gc-test-suite
>> * manual ad-hoc testing
>> Thanks!
>> /Per

More information about the hotspot-gc-dev mailing list