On Mon, 16 May 2022 10:17:42 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:
> Greetings, > > [JDK-8233111](https://bugs.openjdk.java.net/browse/JDK-8233111) attempted to > address artefact tagging for Compiler threads, letting threads run > _thread_in_native to avoid the transition. Unfortunately, that attempt proved > inadequate. > > The epoch race is avoided only by performing the transition to _thread_in_vm. > > Testing: jdk_jfr > > Thanks > Markus src/hotspot/share/compiler/compilerEvent.cpp line 126: > 124: static inline void commit(EventType& event) { > 125: JavaThread* thread = JavaThread::current(); > 126: assert(thread->thread_state() == _thread_in_native, "invariant"); You don't need this assert as `ThreadInVMfromNative` already has it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8724