JDK-8230459: Test failed to resume JVMCI CompilerThread
Doerr, Martin
martin.doerr at sap.com
Mon Oct 14 14:50:19 UTC 2019
Hi David,
>> As C1 and C2 compiler threads are hidden, I still don't see any problems reusing the Thread objects.
> They are not completely hidden. Those j.l.Thread objects are still part of the system thread group and can be found by other code.
I know that they are part of the system thread group, but I thought they should not be visible to Java.
E.g.
ThreadGroup tg = new ThreadGroup("A");
ThreadGroup stg = tg.getParent().getParent();
Thread[] list = new Thread[100];
stg.enumerate(list);
System.out.println("Listing elements of " + stg);
for (int i = 0; i < list.length; ++i) {
if (list[i] != null) {
System.out.println(i + ": " + list[i]);
}
}
Finds:
Listing elements of java.lang.ThreadGroup[name=system,maxpri=10]
0: Thread[Reference Handler,10,system]
1: Thread[Finalizer,8,system]
2: Thread[Signal Dispatcher,9,system]
3: Thread[main,5,main]
I can't see any compiler threads.
Do you mean finding them by JVMTI agent?
As I understand the Spec, compiler threads should be excluded for GetAllThreads: "The threads are Java programming language threads"
Or what did you mean by "other code" which can see C1 and C2 threads?
Best regards,
Martin
More information about the hotspot-compiler-dev
mailing list