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

jdk.NativeLibraryEvent hooks all opened regular files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      15
    • Resolved In Build:
      b27
    • OS:
      linux

      Description

      https://mail.openjdk.java.net/pipermail/hotspot-jfr-dev/2020-March/001302.html

      We would get multiple jdk.NativeLibrary events from 1 library as below:

      ```
      jdk.NativeLibrary {
         startTime = 16:59:06.621
         name = "/usr/lib64/libc-2.30.so"
         baseAddress = 0x7FDB06ACC000
         topAddress = 0x7FDB06AF1000
      }

      jdk.NativeLibrary {
         startTime = 16:59:06.621
         name = "/usr/lib64/libc-2.30.so"
         baseAddress = 0x7FDB06AF1000
         topAddress = 0x7FDB06C40000
      }

          :

      ```

      In addition, we would get the events even if they are not shared library as below:

      ```
      jdk.NativeLibrary {
         startTime = 16:59:06.621
         name = "/home/ysuenaga/OpenJDK/jdk/build/linux-x86_64-server-fastdebug/images/jdk/lib/server/cl
      asses.jsa"
         baseAddress = 0x800000000
         topAddress = 0x800007000
      }
      ```

      os::get_loaded_modules_info() has introduced in JDK-8056242, and it says this function is for dll/so/dylibs.
      In fact, os::get_loaded_modules_info() uses EnumProcessModules() in Windows.

      We should merge same library to one event, and should not hook regular files (not shared library).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ysuenaga Yasumasa Suenaga
              Reporter:
              ysuenaga Yasumasa Suenaga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: