RFR: 8218974: Free GC native structures in nmethod::flush
erik.osterlund at oracle.com
Thu Feb 14 11:55:39 UTC 2019
An nmethod goes from being is_alive() to being !is_alive() and
eventually being freed in nmethod::flush. Native structures for nmethods
are freed in nmethod::flush when we free the nmethod. Except for a few
things, including GC data. This enhancement proposes to fix that to make
the life cycle of nmethods and their native data more intuitive.
In particular ZGC has per-nmethod data. The data is removed when
unlinking nmethods, as opposed to when they are deleted. This is a bit
awkward and makes things more difficult than they need to be. This patch
adds a new CollectedHeap::flush_nmethod() function. In there ZGC deletes
its attached GC data.
More information about the hotspot-gc-dev