All of lore.kernel.org
 help / color / mirror / Atom feed
* Make jitted assembly code available for annotation in "perf report"?
@ 2021-09-09 19:02 Timo Paulssen
  2021-09-09 19:18 ` Ian Rogers
  0 siblings, 1 reply; 2+ messages in thread
From: Timo Paulssen @ 2021-09-09 19:02 UTC (permalink / raw)
  To: linux-perf-users

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.

Thanks in advance
   - Timo


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Make jitted assembly code available for annotation in "perf report"?
  2021-09-09 19:02 Make jitted assembly code available for annotation in "perf report"? Timo Paulssen
@ 2021-09-09 19:18 ` Ian Rogers
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Rogers @ 2021-09-09 19:18 UTC (permalink / raw)
  To: Timo Paulssen; +Cc: linux-perf-users

On Thu, Sep 9, 2021 at 12:09 PM Timo Paulssen <timo@wakelift.de> 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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-09 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 19:02 Make jitted assembly code available for annotation in "perf report"? Timo Paulssen
2021-09-09 19:18 ` Ian Rogers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.