Hi Chris,
On 14/02/2019 4:54 pm, Chris Plummer wrote:
Hi David,
I can update the man page. Can you point me to where it is in the
source? I haven't been able to find it. It seems to be out of date in
other ways also.
Will send pointer separately as it's not part of OpenJDK.
This is what the output looks like (with my fix).
main[1] threads
Group system:
(java.lang.ref.Reference$ReferenceHandler)908 Reference Handler running
(java.lang.ref.Finalizer$FinalizerThread)909 Finalizer cond. waiting
(java.lang.Thread)910 Signal Dispatcher running
Group main:
(java.lang.Thread)1 main running (at
breakpoint)
Group InnocuousThreadGroup:
(jdk.internal.misc.InnocuousThread)911 Common-Cleaner cond.
waiting
Note there is no index printed as the docs suggest. Also, the docs don't
even mention having the threadID printed.
Okay probably need a separate bug to update the man page then.
I found this change very useful while using jdb to debug the JDWP debug
agent. If I don't push it, it will likely just stay as an uncommitted
change in my local repo indefinitely since I continue to find use for it.
As for the status of jdb, it is supported and we do actively fix it.
It's greatest use is probably in testing JDI, since a large number of
JDI tests do so using jdb. Also, I've been using it a lot lately to test
loom debugging support I've been adding to the JDWP debug agent.
I don't know about needing a CSR request. The rules for needing one
elude me. I consider you the expert in that area. :)
Well this isn't changing a programming interface just the UI, so unless
people use it with some kind of screen scraping I can't see there being
a compatibility issue.
Cheers,
David
-----
thanks,
Chris
On 2/13/19 8:53 PM, David Holmes wrote:
<offlist>
pps. You'll also need to update the man page as it has an example
showing the hex:
threads
List the threads that are currently running. For each
thread, its name and current status are printed and
an index that can be used in other commands. In this
example, the thread index is 4, the thread is an
instance of java.lang.Thread, the thread name is main,
and it is currently running.
4. (java.lang.Thread)0x1 main running
Is this change really worth bothering with? What's the status of jdb
(I was surprised to seem this is all an example!) ? Does this need a
CSR request?
Cheers,
David
On 14/02/2019 2:36 pm, David Holmes wrote:
PS.
return MessageOutput.format("object description and hex id",
Need to change the message too!
David
On 14/02/2019 2:32 pm, David Holmes wrote:
Hi Chris,
On 14/02/2019 1:37 pm, Chris Plummer wrote:
Hi,
Please review the following:
http://cr.openjdk.java.net/~cjplummer/8218947/webrev
https://bugs.openjdk.java.net/browse/JDK-8218947
Are there times you may want to correlate those thread ids with ones
in other logs/tools that are in hex?
That aside:
java.lang.Long.toString
you don't need the java.lang part (it's always implicitly imported).
Thanks,
David
-----
Tested by running the following on all supported platforms:
open/test/hotspot/jtreg/vmTestbase/nsk/jdb
open/test/jdk/com/sun/jdi
thanks,
Chris