[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a hack to do -- jitmaps
From: |
Andy Wingo |
Subject: |
a hack to do -- jitmaps |
Date: |
Wed, 26 Feb 2020 22:17:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- a hack to do -- jitmaps,
Andy Wingo <=