RFR: 8300926: Several startup regressions ~6-70% in 21-b6 all platforms [v6]
Robbin Ehn
rehn at openjdk.org
Tue Mar 7 13:47:58 UTC 2023
On Mon, 6 Mar 2023 07:05:00 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Comment fixes
>> - Include/fwd fixes
>
> src/hotspot/share/prims/whitebox.cpp line 798:
>
>> 796: result += mh->method_holder()->mark_osr_nmethods(&deopt_scope, mh());
>> 797: } else if (mh->code() != nullptr) {
>> 798: deopt_scope.mark(mh->code());
>
> I was working on a patch based on top of this one and had a crash here.
>
> The second call to `mh->code()` returned a `nullptr`. It looks racy to me and seems like the only thing protecting `CompileMethod::code()` is the `CompiledMethod_lock` which is not held here.
>
> Regardless `mh->code()` should probably only be loaded once. (Or at least not re-loaded after the nullptr check)
Fixed, thanks!
-------------
PR: https://git.openjdk.org/jdk/pull/12585
More information about the hotspot-dev
mailing list