--- a/hotspot/src/share/vm/runtime/java.cpp Mon Jun 13 10:10:35 2016 +0200
+++ b/hotspot/src/share/vm/runtime/java.cpp Mon Jun 13 11:48:11 2016 +0200
@@ -446,6 +446,14 @@
os::infinite_sleep();
}
+ EventThreadEnd event;
+ if (event.should_commit()) {
+ event.set_thread(THREAD_TRACE_ID(thread));
+ event.commit();
+ }
+
+ TRACE_VM_EXIT();
+
// Stop the WatcherThread. We do this before disenrolling various
// PeriodicTasks to reduce the likelihood of races.
if (PeriodicTask::num_tasks() > 0) {
@@ -484,13 +492,6 @@
JvmtiExport::post_thread_end(thread);
}
-
- EventThreadEnd event;
- if (event.should_commit()) {
- event.set_thread(THREAD_TRACE_ID(thread));
- event.commit();
- }
-
// Always call even when there are not JVMTI environments yet, since environments
// may be attached late and JVMTI must track phases of VM execution
JvmtiExport::post_vm_death();