RFR: 8241427: Coarsen locking in Modules::add_module_exports
Claes Redestad
claes.redestad at oracle.com
Wed Mar 25 16:23:18 UTC 2020
Hi again,
updated after offline discussion with Lois:
http://cr.openjdk.java.net/~redestad/8241427/open.01
- replaced package_entry->module() != module_entry checks with
an assert in get_locked_package_entry.
- removed corresponding throwing of IAEs
- refactored logic in add_module_exports_to_all_unnamed to be
similar to add_module_exports
Thanks!
/Claes
On 2020-03-23 12:27, Claes Redestad wrote:
> Hi,
>
> in some places we first lookup a PackageEntry - taking and releasing
> Module_lock - only to then, after some trivial checks - take the
> Module_lock again to update some state in the PackageEntry.
>
> Coarsening the locking so we only take the mutex once per call brings a
> small improvement to bootstrap (reduction of ~200-250k instructions)
>
> Webrev: http://cr.openjdk.java.net/~redestad/8241427/open.00/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8241427
>
> Testing: tier1-3
>
> Thanks!
>
> /Claes
More information about the hotspot-runtime-dev
mailing list