RFR: 8249880 - JVMCI calling register_nmethod without CodeCache lock
Tom Rodriguez
tom.rodriguez at oracle.com
Wed Jul 22 17:56:11 UTC 2020
Looks good.
tom
Bob Vandette wrote on 7/22/20 8:07 AM:
> Please review this fix which adds a CodeCache lock around registering an nmethod with
> the collector. This is causing a guarantee to fire when the nmethod sweeper runs during
> a CompileTheWorld test.
>
> BUG:
> https://bugs.openjdk.java.net/browse/JDK-8249880
>
> PATCH:
>
> diff --git a/src/hotspot/share/jvmci/jvmciRuntime.cpp b/src/hotspot/share/jvmci/jvmciRuntime.cpp
> --- a/src/hotspot/share/jvmci/jvmciRuntime.cpp
> +++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp
> @@ -668,6 +668,7 @@
>
> // Since we've patched some oops in the nmethod,
> // (re)register it with the heap.
> + MutexLocker ml(CodeCache_lock, Mutex::_no_safepoint_check_flag);
> Universe::heap()->register_nmethod(nm);
> }
>
> Bob.
>
More information about the hotspot-compiler-dev
mailing list