RFR 8207778: Add locking to ModuleEntry and PackageEntry tables

Lois Foltan lois.foltan at oracle.com
Thu Aug 9 19:06:13 UTC 2018

On 8/9/2018 2:10 PM, Harold David Seigel wrote:

> Hi,
> Please review this fix for JDK-8207778.  Instead of adding additional 
> and unneeded locking to the ModuleEntry and PackageEntry tables, the 
> ClassLoaderDataGraph unloading code was restructured to simplify 
> changing SystemDictionary::do_unloading() to safely scan these tables 
> either by taking a lock or during a safepoint.
> Also, asserts for other tables scanned by 
> SystemDictionary::do_unloading() were changed from requiring a 
> safepoint to requiring either a lock or a safepoint.
> Open Webrev: http://cr.openjdk.java.net/~hseigel/bug_8207778/webrev/
> JBS Bug:  https://bugs.openjdk.java.net/browse/JDK-8207778
> This fix was regression tested by running Mach5 tiers 1 and 2 tests 
> and builds on Linux-x64, Windows, and Mac OS X, running tiers 3-5 
> tests on Linux-x64, and by running JCK-11 API, Lang and VM tests on 
> Linux-x64.
> Thanks, Harold

Looks good.  A couple of minor comments:

- classLoaderData.cpp
   ClassLoaderDataGraph::clean_module_and_package_info does more than 
just purge module reads and package exports lists, it
   also removes entries in the dictionary of live class loaders. Maybe 
consider changing the name?

- packageEntry.cpp
    needs copyright updated.


More information about the hotspot-runtime-dev mailing list