--- old/src/share/vm/code/nmethod.cpp 2016-10-25 10:40:06.684775878 +0200 +++ new/src/share/vm/code/nmethod.cpp 2016-10-25 10:40:06.634775845 +0200 @@ -43,6 +43,7 @@ #include "utilities/dtrace.hpp" #include "utilities/events.hpp" #include "utilities/xmlstream.hpp" +#include "evtrace/traceManager.hpp" #ifdef SHARK #include "shark/sharkCompiler.hpp" #endif @@ -1703,6 +1704,11 @@ } assert(_method != NULL && !is_unloaded(), "just checking"); + + if (EnableEventTracing) { + TraceManager::nmethod_is_unloading(this); + } + DTRACE_METHOD_UNLOAD_PROBE(method()); // If a JVMTI agent has enabled the CompiledMethodUnload event then