I want to profile code, generated by JIT on Linux, with using hardware performace counters. As I know, most common profilers are oprofile
and perf
.
How can I integrate JIT and oprofile/perf?
My JIT is not JAVA which is already supported in oprofile. (perf?)
For example we can consider LLVM's JIT. I want to
To profile JITed code using perf, download, compile and install the perf-map-agent library, then (for java code anyway) add the
-agentpath:<path>/libperfmap.so
to the command line.
For non-java code, as long as the /tmp/perf-$pid.map
symbol map files are generated, perf
will use those when it produces perf reports.
Brendan Gregg has a blog post that has related references.