RFR: JDK-8329663: hs_err file event log entry for thread adding/exiting prints Java thread related pointer twice [v2]
Matthias Baesken
mbaesken at openjdk.org
Fri Apr 5 08:12:28 UTC 2024
On Fri, 5 Apr 2024 05:34:35 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>>
>> adjust info string for removed threads
>
> src/hotspot/share/runtime/threads.cpp line 1084:
>
>> 1082:
>> 1083: // Since Events::log uses a lock, we grab it outside the Threads_lock
>> 1084: Events::log(Thread::current(), "exited thread: " INTPTR_FORMAT, p2i(p));
>
> Most of the time a thread "exits" itself so `Thread::current() == p` in that case. Only in two error cases is a newly created thread removed by the thread that added it. So this revised wording doesn't really make sense for the majority of cases. I think it makes sense to report the thread doing the add/remove as well as the thread being added/removed, so I would suggest replacing `exited` with `removed`.
>
> That said any change here may disrupt existing log parsing, including tests, so that needs to be considered.
I adjusted the coding.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18627#discussion_r1553158346
More information about the hotspot-runtime-dev
mailing list