diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-01-12 16:20:13 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-01-16 10:14:12 -1000 |
commit | 5584e2dbe8c9c95ceb178786fb88e5edf625e1b6 (patch) | |
tree | 6b117636e203be8e4246aa30704d784243e4deee /qemu-options.hx | |
parent | 7c10cb38ccb86a0e56fff32bb348aa4b34e17e10 (diff) |
tcg: add perfmap and jitdump
Add ability to dump /tmp/perf-<pid>.map and jit-<pid>.dump.
The first one allows the perf tool to map samples to each individual
translation block. The second one adds the ability to resolve symbol
names, line numbers and inspect JITed code.
Example of use:
perf record qemu-x86_64 -perfmap ./a.out
perf report
or
perf record -k 1 qemu-x86_64 -jitdump ./a.out
DEBUGINFOD_URLS= perf inject -j -i perf.data -o perf.data.jitted
perf report -i perf.data.jitted
Co-developed-by: Vanderson M. do Rosario <vandersonmr2@gmail.com>
Co-developed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230112152013.125680-4-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r-- | qemu-options.hx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/qemu-options.hx b/qemu-options.hx index 3aa3a2f5a3..d59d19704b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4838,6 +4838,26 @@ SRST Enable synchronization profiling. ERST +#if defined(CONFIG_TCG) && defined(CONFIG_LINUX) +DEF("perfmap", 0, QEMU_OPTION_perfmap, + "-perfmap generate a /tmp/perf-${pid}.map file for perf\n", + QEMU_ARCH_ALL) +SRST +``-perfmap`` + Generate a map file for Linux perf tools that will allow basic profiling + information to be broken down into basic blocks. +ERST + +DEF("jitdump", 0, QEMU_OPTION_jitdump, + "-jitdump generate a jit-${pid}.dump file for perf\n", + QEMU_ARCH_ALL) +SRST +``-jitdump`` + Generate a dump file for Linux perf tools that maps basic blocks to symbol + names, line numbers and JITted code. +ERST +#endif + DEFHEADING() DEFHEADING(Generic object creation:) |