RFR: 8322484: 22-b26 Regression in J2dBench-bimg_misc-G1 (and more) on Windows-x64 and macOS-x64
Kim Barrett
kbarrett at openjdk.org
Thu Jan 25 15:17:39 UTC 2024
On Thu, 25 Jan 2024 14:33:28 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1RegionPinCache.cpp line 33:
>>
>>> 31: G1RegionPinCache::~G1RegionPinCache() {
>>> 32: flush();
>>> 33: }
>>
>> This file is almost empty; I wonder if this method can be moved to hpp or inline.hpp.
>
> Moving this to the .hpp or .inline.hpp would require to include the .inline.hpp into g1ThreadLocalData.hpp, which we do not allow.
> The alternative would be creating a g1ThreadLocalData.inline.hpp and putting it there, but that would gain nothing.
> I'll try.
Doing the flush in the destructor is too late. It needs to be done in G1BarrierSet::on_thread_detach.
A thread might be detached but not yet deleted for SMR reasons. If a GC occurs then, the pending
cached pin manipulation won't be found by the thread walk because the thread is not in the current
threads list.
That of course solves the problem of where to put it. :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17552#discussion_r1466503244
More information about the hotspot-gc-dev
mailing list