On 3/7/19 12:54 PM, Daniil Titov wrote:

Please review a change that fixes this test.

The problem here is that the test checks the number of threads and with Graal on additional threads the test doesn't expect are started and cause the test fail.

The fix introduces a new capability " can_show_compiler_threads" that affects whether Java compiler threads are retuned with JVMTI GetAllThreads call. By default this capability is off. The fix also adds " HotSpotGraalManagement Bean Registration" thread to the list of the threads the tests must ignore.

Webrev: http://cr.openjdk.java.net/~dtitov/8218812/webrev.01


src/hotspot/share/prims/jvmti.xml
    L10382:       <capabilityfield id="can_show_compiler_threads" since="13">
        You might want to include a diff between the old generated jvmti.h
        and the new one. I expect it to show something like this:

          unsigned int can_generate_resource_exhaustion_threads_events : 1;
          +    unsigned int can_show_compiler_threads : 1;
          -    unsigned int : 7;
          +    unsigned int : 6;

        Also, I think this will need a JVM/TI version bump so that an agent
        can conditionally compile in the code that accesses the new
        can_show_compiler_threads field.

        This also will need a CSR since it is changing an API.

src/hotspot/share/prims/jvmtiEnv.cpp
    No comments.

src/hotspot/share/prims/jvmtiExport.cpp
    No comments.

src/hotspot/share/prims/jvmtiExport.hpp
    No comments.

src/hotspot/share/prims/jvmtiManageCapabilities.cpp
    No comments.

src/hotspot/share/services/threadService.cpp
    L1048:     if (!include_compiler_threads && jt->is_Compiler_thread()) {
    L1049:         continue;
        nit - please reduce indent by two spaces

src/hotspot/share/services/threadService.hpp
    No comments.

test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp
    No comments.

Thumbs up on the code changes. Double check with Serguei about
the need for a CSR...

Dan

Bug: https://bugs.openjdk.java.net/browse/JDK-8218812

Mach5 tier1, tier2 and tier3 tests successfully passed with this change.

Thanks!

-Daniil


Reply via email to