Our great sponsors
-
perf defines an interface to resolve symbols for dynamically generated code by a JIT compiler. These files usually can be found in /tmp/perf-$PID.map, where $PID is the process ID of the process of the runtime that is running on the system.
-
The runtimes usually don't enable providing symbol mappings by default. You might need to change a configuration, run the virtual machine with a specific flag/environment variable or run an additional program to obtain these mappings. For example, JVM needs an agent to provide supplemental symbol mapping files, called perf-map-agent.
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
parca-agent
eBPF based always-on profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
Let's see an example perf map file for NodeJS. The runtimes out there output this file with more or less the same format, more or less!
-
As a result, you need to craft a specific routine for each interpreter runtime (in some cases, each version of that runtime) to obtain symbol information. Educated eyes might have already noticed, it's not an easy undertaking considering the sheer amount of interpreted languages out there. For example, a very well known Ruby profiler, rbspy, generates code for reading internal structs of the Ruby runtime for each version.
Related posts
- Frame pointers vs. DWARF – my verdict
- Parca Agent rewrites eBPF in-kernel C code in Rust (using Aya-rs)
- Hi everyone, How could you find the lines executed for a particular method call in any language (java, go..) using eBPF?
- Dwarf-Based Stack Walking Using eBPF
- Does mTLS add request latency due to ssl termination? Any best practices for performance?