A Java agent that generates method mapping files for JIT-compiled code to enable profiling with Linux perf tools.
perf-map-agent is a Java agent that generates symbol map files (`/tmp/perf-<pid>.map`) for JIT-compiled methods and other runtime-generated code in Java applications. It solves the problem of Linux `perf` tools being unable to resolve symbols for dynamically generated Java code, enabling system-level performance profiling of JVM applications.
Java developers and performance engineers who need to profile applications at the native level using Linux `perf` or DTrace, especially those troubleshooting performance issues in production environments.
It provides a lightweight, non-intrusive way to map JIT-compiled Java methods to native addresses, enabling detailed flame graphs and `perf` reports without requiring invasive JVM instrumentation or restarts.
A java agent to generate method mappings to use with the linux perf tool
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Can attach to running Java processes via PID without restarting, enabling non-intrusive production profiling, as noted in the README's attach functionality.
Maps JIT-compiled methods, interpreter code, adaptors, and vtables/itables, providing comprehensive visibility into runtime-generated code blobs.
Includes shell scripts like perf-java-flames for flame graph generation, streamlining common profiling workflows and integration with perf tools.
Offers 'unfold' and 'unfoldall' options to separate inlined methods for finer-grained analysis, though with noted accuracy trade-offs.
The README explicitly warns that 'skid' can cause incorrect symbol resolution, especially with unfolded entries, leading to misleading profiling data.
Requires specific JVM flags (e.g., -XX:+PreserveFramePointer), external tools like FlameGraph, and separate debug symbols for libjvm.so, adding overhead.
The author's disclaimer states the code is 'experimental' with missing error checks, which could result in stability issues in production environments.