* a hack to do -- jitmaps
@ 2020-02-26 21:17 Andy Wingo
0 siblings, 0 replies; only message in thread
From: Andy Wingo @ 2020-02-26 21:17 UTC (permalink / raw)
To: guile-devel
Hey :)
I thought of a thing that I don't have time to implement right now:
perf jitmap support in Guile.
Basically, the "perf" Linux tool is a widely-available instruction-level
and microarchitectural profiler. It's great: you run "perf record guile
foo.scm", and then you run "perf report", and you get instruction-level
info on the profile. You can grab call graphs, see performance
counters, all kinds of things. Good stuff.
With run-time code generation though, perf needs some help from the
program generating code. The most basic step is what's known as "perf
maps", placed in /tmp/perf-$PID.map. These are super-basic and just
identify code ranges with functions. I just pushed a patch doing this.
The more useful thing is what's known as "jitmaps". See
https://lwn.net/Articles/633846/, and
https://chromium.googlesource.com/v8/v8/+/refs/heads/master/src/diagnostics/perf-jit.cc.
It's totally underdocumented, but it actually saves the JIT code to a
file, which is needed to have instruction-level profiling. It also adds
support for unwinding frames and source info.
Anyway if anyone wants to take this task in the next few weeks, LMK :)
Andy
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-26 21:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26 21:17 a hack to do -- jitmaps Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).