Re: Make jitted assembly code available for annotation in "perf report"?
From: Ian Rogers <irogers@google.com>
Date: 2021-09-09 19:18:58
On Thu, Sep 9, 2021 at 12:09 PM Timo Paulssen [off-list ref] wrote:
Hello perf users and devs, I'm a contributor to the MoarVM project, which is the interpreter and jit runtime that powers the Rakudo compiler of the Raku language, which you may have heard of back when it was still called Perl 6. We already output a file `/tmp/perf-%d.map` that contains the start and end addresses of jit-generated symbols, but I don't know how to tell perf where to look for the binary. Our current code will dump each compiled piece of code to a folder with an incrementing number. The perf report frontend will in its current implementation answer the request to annotate a function by just running objdump against the perf-%d.map file, which unsurprisingly doesn't work. I would be glad to hear suggestions, especially ones that don't require me to generate a full elf file or similar to hold the symbols.
Hi Timo, Did you look into jitdump? It requires the perf.data file be processed by perf inject, see the -j option in: https://man7.org/linux/man-pages/man1/perf-inject.1.html An example JIT agent is provided for JVMTI: https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/jvmti?h=perf/core Thanks, Ian
Thanks in advance - Timo