JDK-8254723 : Add diagnostic command to write Linux perf map file
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2020-10-14
  • Updated: 2024-02-29
  • Resolved: 2020-11-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b23Fixed
Related Reports
CSR :  
Relates :  
Relates :  
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.

Comments
Changeset: 50357d13 Author: Nick Gasson <ngasson@openjdk.org> Date: 2020-11-03 01:37:57 +0000 URL: https://github.com/openjdk/jdk/commit/50357d13
03-11-2020