RFR: 8331572: Allow using OopMapCache outside of STW GC phases [v2]
Coleen Phillimore
coleenp at openjdk.org
Thu May 16 14:20:04 UTC 2024
On Thu, 16 May 2024 07:22:20 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> src/hotspot/share/interpreter/oopMapCache.cpp line 545:
>>
>>> 543:
>>> 544: // First search for an empty slot
>>> 545: for (int i = 0; i < _probe_depth; i++) {
>>
>> Does the GlobalCounter read barrier belong around this too?
>
> I don't think so: GlobalCounter guards against the reclamation of `OopMapCacheEntry`-es, so we only need to protect the paths that access their contents. We don't need it for anything else, like just poking into the array slots here. I used to have the critical section that spans this entire method, but reasoned it was excessive.
Ok, I concur. It looks ok since the oopMapCache is an array so the search for the null container won't search through next pointers of entries that could be removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19229#discussion_r1603438240
More information about the shenandoah-dev
mailing list