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

Some nsk/jdi tests can glean the "main" thread by using the ClassPrepareEvent for the debuggee main class

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • core-svc
    • b21

      As part of the work for JDK-8353955 I am reducing the number of tests that need to be run with includevirtualhreads=y due to using JDI to lookup threads in the debuggee. There are many tests that lookup the "main" thread. They can instead glean the "main" thread from the ClassPrepareEvent for the debuggee main class. Some tests already wait for this ClassPrepareEvent, and can take advantage of it. Most do not, but can be made to do so. The easiest way to do this for many of the tests is to wait for the event in Debuggee.prepareDebuggee() after having called Debuggee.bindToDebuggee. This doesn't seem to have any ill affect on the tests.

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

              Created:
              Updated:
              Resolved: