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

jdk.NativeLibraryEvent hooks all opened regular files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • 15
    • hotspot
    • None
    • 15
    • b27
    • linux

      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).

            ysuenaga Yasumasa Suenaga
            ysuenaga Yasumasa Suenaga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: