RFR: 8359820: Improve handshake/safepoint timeout diagnostic messages [v4]
Anton Artemov
duke at openjdk.org
Fri Jul 18 15:10:35 UTC 2025
On Fri, 18 Jul 2025 13:31:43 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8359820: Addressed reviewer's comments
>
> src/hotspot/share/runtime/safepoint.cpp line 70:
>
>> 68: #include "utilities/systemMemoryBarrier.hpp"
>> 69:
>> 70: intptr_t safepointTimedOutThread = p2i(nullptr);
>
> Maybe not a global variable.
>
> I would either make this a static member of SafePoint and the other one a static member of Handshake, or (maybe simpler) both static members of VMError, plus accessors.
Good idea, moved to `VMError`.
> src/hotspot/share/utilities/vmError.cpp line 822:
>
>> 820: if (_siginfo != nullptr && os::signal_sent_by_kill(_siginfo)) {
>> 821: if (handshakeTimedOutThread == p2i(_thread)) {
>> 822: st->print(" (sent by handshake timeout handler, timed out thread " PTR_FORMAT ")", handshakeTimedOutThread);
>
> since this thread is the timeouted thread, I think printing the thread's pointer is redundant and possibly confusing (it confused me). I would just write "sent by handshake timeout handler".
Addressed in the latest commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26309#discussion_r2216286950
PR Review Comment: https://git.openjdk.org/jdk/pull/26309#discussion_r2216286731
More information about the hotspot-runtime-dev
mailing list