RFR: 8249880 - JVMCI calling register_nmethod without CodeCache lock
Erik Österlund
erik.osterlund at oracle.com
Wed Jul 22 15:12:41 UTC 2020
Hi Bob,
Looks good.
Thanks,
/Erik
On 2020-07-22 17:07, Bob Vandette wrote:
> 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