RFR: JDK-8237780: Shenandoah: More reliable nmethod verification

Aleksey Shipilev shade at redhat.com
Fri Feb 14 21:18:11 UTC 2020


On 2/14/20 8:29 PM, Roman Kennke wrote:
> I've also left in some debug-output but under #ifdef ASSERT_DISABLED. I
> found that very useful and wouldn't want to throw it away.

I think the proper way to do this is:

 #if 0 // Helpful for debugging

...but then I wonder, why not turn it into the actual fastdebug diagnostics? Our verifier/asserts
very helpfully include a lot of debugging info into hs_err when asserts fail. Surely if we are
chasing a very rare bug, it would be more convenient for hs_err to include that right away, not
require us recompile the VM.

> Webrev:
> http://cr.openjdk.java.net/~rkennke/JDK-8237780/webrev.00/

*) Looks like you can just initialize "int count = _oop_count" and skip increments in the first loop.

*) Capitalization in "Must", to match the style of other asserts:

 305     assert(nm == data->nm(), "must be same nmethod");

*) assert(false, ...) is probably just fatal(...)

-- 
Thanks,
-Aleksey



More information about the hotspot-gc-dev mailing list