8158033: Notify_tracing() misplaced for intended purpose

Reviewed-by: egahlin, dholmes
This commit is contained in:
Markus Grönlund 2016-06-13 11:48:11 +02:00
parent 9eeb285818
commit de7ab979ec
5 changed files with 13 additions and 21 deletions

View file

@ -446,6 +446,14 @@ void before_exit(JavaThread* thread) {
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 @@ void before_exit(JavaThread* thread) {
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();