8329663: hs_err file event log entry for thread adding/removing should print current thread

Backport-of: 3ebf8c9359
This commit is contained in:
Matthias Baesken
2024-05-15 11:48:42 +00:00
committed by Vitaly Provodin
parent 2f028fbae7
commit dda9d6103f

View File

@@ -1014,7 +1014,7 @@ void Threads::add(JavaThread* p, bool force_daemon) {
ObjectSynchronizer::inc_in_use_list_ceiling();
// Possible GC point.
Events::log(p, "Thread added: " INTPTR_FORMAT, p2i(p));
Events::log(Thread::current(), "Thread added: " INTPTR_FORMAT, p2i(p));
// Make new thread known to active EscapeBarrier
EscapeBarrier::thread_added(p);
@@ -1077,7 +1077,7 @@ void Threads::remove(JavaThread* p, bool is_daemon) {
ObjectSynchronizer::dec_in_use_list_ceiling();
// Since Events::log uses a lock, we grab it outside the Threads_lock
Events::log(p, "Thread exited: " INTPTR_FORMAT, p2i(p));
Events::log(Thread::current(), "Thread exited: " INTPTR_FORMAT, p2i(p));
}
// Operations on the Threads list for GC. These are not explicitly locked,