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

Add diagnostic command to write Linux perf map file

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      svc
    • Resolved In Build:
      b23
    • OS:
      linux

      Description

      When using the Linux "perf" tool to do system profiling, symbol names of running Java methods cannot be decoded, resulting in unhelpful output such as:

        10.52% [JIT] tid 236748 [.] 0x00007f6fdb75d223

      Perf can read a simple text file format describing the mapping between address ranges and symbol names for a particular process:

      https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/jit-interface.txt

      It's possible to generate this already for Java processes using a JVMTI plugin, e.g. with https://github.com/jvm-profiling-tools/perf-map-agent . However this requires compiling third-party code and then loading the agent into your Java process. It would be more convenient if Hotspot could write this file directly using a diagnostic command. The information required is almost identical to that of the existing Compiler.codelist command.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ngasson Nick Gasson
              Reporter:
              ngasson Nick Gasson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: