Remove explicit libjvm.so dependency for libVThreadEventTest

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: None
    • Component/s: hotspot
    • None
    • b13

      When running test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadEventTest/VThreadEventTest.java on static JDK, it fails due to missing libjvm.so:

      ```
      TEST RESULT: Failed. Execution failed: `main' threw exception: com.sun.tools.attach.AgentLoadException: Failed to load agent library: VThreadEventTest was not loaded. libjvm.so: cannot open shared object file: No such file or directory
      ```

      Looking at libVThreadEventTest.cpp, I think the only reason for explicitly linking with `libjvm.so` is the direct function call to `JNI_GetCreatedJavaVMs` from `Agent_OnAttach`. And there is no need to call `JNI_GetCreatedJavaVMs` since `Agent_OnAttach` already has the `vm` arg.

            Assignee:
            Jiangli Zhou
            Reporter:
            Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: