RFR(S) 8142436: [JVMCI] fix management of nmethod::_installed_code field

Mikael Gerdin mikael.gerdin at oracle.com
Wed Nov 11 09:44:04 UTC 2015


On 2015-11-10 21:53, Tom Rodriguez wrote:
> http://cr.openjdk.java.net/~never/8142436/webrev/
>
> nmethod::_installed_code maintains a link to the InstalledCode instance
> associated with an nmethod and will be cleared out once the
> InstalledCode reference is dead or when the nmethod becomes a zombie.
>   Since G1 tracks which nmethods have references into a region, special
> care must be take when updating this field to avoid crashes.  Barriers
> must be run with changing the value of this field, which wasn’t being
> done in maybe_invalidate_installed_code, so the clearing of that field
> was consolidated with barriers.   There was also an extra copy of some
> special logic in do_unloading_parallel that was missing the barriers,
> which was deleted.  Tested with Graal bootstrap running with G1 that
> would previously crash in G1 about 1 in 4 times.

Additionally, you can run with +G1VerifyHeapRegionCodeRoots to enable 
verification of the heap region to nmethod mapping in order to detect 
other issues which don't cause a crash right away.

/Mikael

>
> tom



More information about the hotspot-compiler-dev mailing list