RFR: 8341708: Optimize safepoint poll encoding with smaller poll data offset [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Oct 10 09:12:44 UTC 2024
On Thu, 10 Oct 2024 02:50:47 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Shuffle things around: keep the accessors in JavaThread
>
> src/hotspot/share/runtime/thread.hpp line 140:
>
>> 138: protected:
>> 139: // Poll data is used in generated code for safepoint polls.
>> 140: SafepointMechanism::ThreadData _poll_data;
>
> Should this be private and you can add `friend class JavaThread` to this class. Also, the accessor below should be moved to `JavaThread`, too. Comments explaining that it is put here only for offset optimization would be great.
I tried to avoid this kind of coupling between `Thread` and `JavaThread`, but I don't mind go that way as well. This is would also avoid the awkwardness of having `JavaThread::polling_data_*()` accessors all around our code calling essentially the superclass accessor otherwise. See new commit. I am re-running tests now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21405#discussion_r1795027052
More information about the hotspot-runtime-dev
mailing list