--- old/src/share/vm/runtime/safepoint.cpp 2016-10-25 10:40:11.070778780 +0200 +++ new/src/share/vm/runtime/safepoint.cpp 2016-10-25 10:40:11.022778748 +0200 @@ -53,6 +53,7 @@ #include "services/runtimeService.hpp" #include "utilities/events.hpp" #include "utilities/macros.hpp" +#include "evtrace/traceManager.hpp" #ifdef TARGET_ARCH_x86 # include "nativeInst_x86.hpp" # include "vmreg_x86.inline.hpp" @@ -409,6 +410,11 @@ assert(Threads_lock->owned_by_self(), "must hold Threads_lock"); assert((_safepoint_counter & 0x1) == 1, "must be odd"); + + if (EnableEventTracing) { + TraceManager::do_work_before_safepoint_end(); + } + _safepoint_counter ++; // memory fence isn't required here since an odd _safepoint_counter // value can do no harm and a fence is issued below anyway.