--- old/src/share/vm/prims/jvm.cpp 2016-10-25 10:40:08.811777285 +0200 +++ new/src/share/vm/prims/jvm.cpp 2016-10-25 10:40:08.761777252 +0200 @@ -66,6 +66,7 @@ #include "services/management.hpp" #include "services/threadService.hpp" #include "trace/tracing.hpp" +#include "evtrace/traceEvents.hpp" #include "utilities/copy.hpp" #include "utilities/defaultStream.hpp" #include "utilities/dtrace.hpp" @@ -3349,6 +3350,9 @@ ResourceMark rm(THREAD); oop java_thread = JNIHandles::resolve_non_null(jthread); JavaThread* thr = java_lang_Thread::thread(java_thread); + if (EnableEventTracing) { + TraceEvents::write_thread_name_change(thr); + } // Thread naming only supported for the current thread, doesn't work for // target threads. if (Thread::current() == thr && !thr->has_attached_via_jni()) {