RFR: 8280844: Epoch shift synchronization point for Compiler threads is inadequate

David Holmes dholmes at openjdk.java.net
Mon May 16 11:31:56 UTC 2022


On Mon, 16 May 2022 10:17:42 GMT, Markus Grönlund <mgronlun at 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



More information about the build-dev mailing list