8165949: Serial and ConcMarkSweep do not unload strings when class unloading is disabled

Stefan Johansson stefan.johansson at oracle.com
Tue Sep 20 09:34:56 UTC 2016

Hi all,

Please review this fix for:


This fix builds on top of the sub-task cleanup out for review in:
8166276: Refactor gen_process_roots to allow simpler fix for 8165949

The cleanup task splits gen_process_roots into two version, one for 
young and one for old. This fix takes this one step further and split up 
the old version to have one version for the full-GC case and one for the 
concurrent case used in CMS. This simplifies the methods somewhat and 
also allows to do the bug fix very simple.

The problem we want to solve is for full-GCs when ClassUnloading is 
disabled. In this case the old code translated ClassUnloading = false to 
mark all oops as live, but this is not true for strings in the string 
table. So after the split of old_process_roots into conc_process_roots 
and full_process_roots, full_process_roots can use the is_adjust_phase 
flag to avoid treating all oops in the marking phase.

* JTREG tests locally
* RBT on hs-gc tier 2-4
* Verified that test/runtime/interned/SanityTest.java works for all GC 
with ClassUnloading disabled after the fix.


More information about the hotspot-gc-dev mailing list