Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8282641

Make jdb "threadgroup" command with no args reset the current threadgroup back to the default

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • core-svc
    • None
    • b14

      jdb has a probably very little used command called "threadgroup" which is used to set the current TheadGroup. The only purpose of the current ThreadGroup is as the default ThreadGroup to use for the "threads" command when no ThreadGroup argument is passed to it.

      "threads" prints out every thread in the ThreadGroup specified as the first argument. If none is specified, it uses the current ThreadGroup. If the current ThreadGroup has not yet been specified, it automatically gets set to the top level ThreadGroup.

      Once setting the current ThreadGroup by using the threadgroup command, it's not that obvious how to reset it back to the default. It turns out the way to do this to set it to the "system" ThreadGroup, which is the top level ThreadGroup (and therefore the initial current ThreadGroup).

      With this enhancement I'd like to make it so if you use the "threadgroup" command with no argument, then it resets the current ThreadGroup back to the top level ThreadGroup ("system"). Currently with no arguments it produces an error for not specifying the ThreadGroup argument.

            cjplummer Chris Plummer
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: