--- old/src/share/vm/runtime/thread.cpp 2019-01-28 17:44:38.000000000 +0800 +++ new/src/share/vm/runtime/thread.cpp 2019-01-28 17:44:38.000000000 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1670,7 +1670,7 @@ EventThreadStart event; if (event.should_commit()) { - event.set_javalangthread(java_lang_Thread::thread_id(this->threadObj())); + event.set_thread(THREAD_TRACE_ID(this)); event.commit(); } @@ -1804,7 +1804,7 @@ // from java_lang_Thread object EventThreadEnd event; if (event.should_commit()) { - event.set_javalangthread(java_lang_Thread::thread_id(this->threadObj())); + event.set_thread(THREAD_TRACE_ID(this)); event.commit(); } @@ -2185,6 +2185,11 @@ if (check_asyncs) { check_and_handle_async_exceptions(); } +#if INCLUDE_TRACE + if (is_trace_suspend()) { + TRACE_SUSPEND_THREAD(this); + } +#endif } void JavaThread::send_thread_stop(oop java_throwable) { @@ -2423,6 +2428,11 @@ fatal("missed deoptimization!"); } } +#if INCLUDE_TRACE + if (thread->is_trace_suspend()) { + TRACE_SUSPEND_THREAD(thread); + } +#endif } // Slow path when the native==>VM/Java barriers detect a safepoint is in