RFR: 8306767: Concurrent repacking of extra data in MethodData is potentially unsafe
Emanuel Peter
epeter at openjdk.org
Wed Nov 29 07:19:04 UTC 2023
On Tue, 28 Nov 2023 17:57:12 GMT, Tom Rodriguez <never at openjdk.org> wrote:
>> Hmm. So is it that I just have to have a lock on `allocate_bci_to_data`, or do I have to protect `pdata`? Because `pdata` is returned from `Deoptimization::query_update_method_data`, and so I would have to make the lock take a wider scope than that function, right?
>
> The lock needs to be held while accessing the contents of pdata which is very complicated in this particular usage pattern. Maybe the caller needs to refetch the pointer under a lock instead of passing it out of this method.
I see.
And how about other usages of `ProfileData` from the `mdo`, like these (there is a few variants of them around):
ProfileData* data = mdo->first_data();
ProfileData* data = mdo->bci_to_data(bci);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16840#discussion_r1408845046
More information about the hotspot-dev
mailing list