In SA, CompilerThread::isHiddenFromExternalView() always returns true. However, for hotspot CompilerThread::is_hidden_from_external_view() returns false if JVMCI is being used and LibJVMCICompilerThreadHidden is set false. It is true by default, and is set false when users want to be able to use a java debugger to debug JVMCI. The one area of SA that this bug impacts is in HeapHprofBinWriter::dumpStackTraces(), which will skip over the JVMCI Compiler thread because CompilerThread::is_hidden_from_external_view() always returns true. It should not skip the JVMCI Compiler thread if LibJVMCICompilerThreadHidden is false (and EnableJVMCI is true). However, you could also argue that for SA, LibJVMCICompilerThreadHidden should be ignored and CompilerThread::isHiddenFromExternalView() should always return false for JVMCI Compiler threads. In either case, CompilerThread::isHiddenFromExternalView() needs to be modified to do a better job for JVMCI Compiler threads.
Note, just because JVMCI is enable (ie you are using Graal) doesn't mean a CompilerThread is running java code. There is still a C1 CompilerThread, and the JVMCI CompilerThread(s) might be running the native version of Graal, not the java version. This means simply checking runtime flags to determine JVMCI usage is not really correct, although might be good enough for SA.
Note, just because JVMCI is enable (ie you are using Graal) doesn't mean a CompilerThread is running java code. There is still a C1 CompilerThread, and the JVMCI CompilerThread(s) might be running the native version of Graal, not the java version. This means simply checking runtime flags to determine JVMCI usage is not really correct, although might be good enough for SA.
- relates to
-
JDK-8348347 Cleanup JavaThread subclass support in SA
-
- Resolved
-