The jdb threads command currently prints out the threadID in hex:
main[1] threads
Group system:
(java.lang.ref.Reference$ReferenceHandler)0x355 Reference Handler running
(java.lang.ref.Finalizer$FinalizerThread)0x356 Finalizer cond. waiting
(java.lang.Thread)0x357 Signal Dispatcher running
Group main:
(java.lang.Thread)0x1 main running (at breakpoint)
Group InnocuousThreadGroup:
(jdk.internal.misc.InnocuousThread)0x358 Common-Cleaner cond. waiting
There are a couple of issues with using hex instead of decimal. The first is the threadID needs to be typed in for a number of other commands, and typing it in as decimal is easier than hex. The other issue is that if you enable debug tracing with -dbgtrace, all objectIDs in the trace output are printed in decimal, so it's hard to visually map threadIDs you see in the trace output with the threadIDs you see with the threads command. You need to manually convert between hex and decimal first.
The proposed fix will cause jdb to print all objectIDs in decimal, although currently the threads command is the only one I've seen that is printing objectIDs, but I'm sure there must be other places that also print objectIDs, and it would be best if they were in hex.
main[1] threads
Group system:
(java.lang.ref.Reference$ReferenceHandler)0x355 Reference Handler running
(java.lang.ref.Finalizer$FinalizerThread)0x356 Finalizer cond. waiting
(java.lang.Thread)0x357 Signal Dispatcher running
Group main:
(java.lang.Thread)0x1 main running (at breakpoint)
Group InnocuousThreadGroup:
(jdk.internal.misc.InnocuousThread)0x358 Common-Cleaner cond. waiting
There are a couple of issues with using hex instead of decimal. The first is the threadID needs to be typed in for a number of other commands, and typing it in as decimal is easier than hex. The other issue is that if you enable debug tracing with -dbgtrace, all objectIDs in the trace output are printed in decimal, so it's hard to visually map threadIDs you see in the trace output with the threadIDs you see with the threads command. You need to manually convert between hex and decimal first.
The proposed fix will cause jdb to print all objectIDs in decimal, although currently the threads command is the only one I've seen that is printing objectIDs, but I'm sure there must be other places that also print objectIDs, and it would be best if they were in hex.