On Tue, 28 Nov 2023 14:36:19 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> btw for the following (system/native/runtime/embryotic) Reader thread tseems 
>> to be no java method marked "native" on the stack, what case is that?
>> 
>> 
>> "JDWP Event Helper Thread" #22 daemon prio=10 os_prio=0 cpu=0.00ms 
>> elapsed=65.02s tid=0x000001fc4f7e9970 nid=0x32e0 runnable  
>> [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> 
>> "JDWP Command Reader" #23 daemon prio=10 os_prio=0 cpu=0.00ms elapsed=65.02s 
>> tid=0x000001fc4f7ea480 nid=0x69c4 runnable  [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> 
>> "Notification Thread" #24 daemon prio=9 os_prio=0 cpu=0.00ms elapsed=64.99s 
>> tid=0x000001fc4f7f12a0 nid=0x75f0 runnable  [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> 
>> jshell> mx.getThreadInfo(23)
>> $17 ==> "JDWP Command Reader" daemon prio=10 Id=23 RUNNABLE (in native)
>> 
>> funfact: its not in the list:
>> 
>> 
>> jshell> mx.getAllThreadIds()
>> $11 ==> long[8] { 1, 2, 3, 4, 5, 24, 25, 26 }
>
>> btw for the following (system/native/runtime/embryotic) Reader thread tseems 
>> to be no java method marked "native" on the stack, what case is that?
>> 
>> ```
>> "JDWP Event Helper Thread" #22 daemon prio=10 os_prio=0 cpu=0.00ms 
>> elapsed=65.02s tid=0x000001fc4f7e9970 nid=0x32e0 runnable  
>> [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> 
>> "JDWP Command Reader" #23 daemon prio=10 os_prio=0 cpu=0.00ms elapsed=65.02s 
>> tid=0x000001fc4f7ea480 nid=0x69c4 runnable  [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
> 
> I think you are asking about JVMTI RunAgentThread. That's what the debugger 
> agent uses to create its own threads. RunAgentThread is specified to hide the 
> thread from Java APIs, it's nothing to do with this PR.

Well.. it has to do in so far, that those threads are not hidden - the 
ThreadInfo sees it and says "isNative". But ok if this is not expected, then 
indeed it does not need to be documented.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16791#discussion_r1408093987

Reply via email to