]> git.proxmox.com Git - mirror_qemu.git/commit - tcg/perf.c
tcg: add perfmap and jitdump
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 12 Jan 2023 15:20:13 +0000 (16:20 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 16 Jan 2023 20:14:12 +0000 (10:14 -1000)
commit5584e2dbe8c9c95ceb178786fb88e5edf625e1b6
tree6b117636e203be8e4246aa30704d784243e4deee
parent7c10cb38ccb86a0e56fff32bb348aa4b34e17e10
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>
accel/tcg/meson.build
accel/tcg/perf.c [new file with mode: 0644]
accel/tcg/perf.h [new file with mode: 0644]
accel/tcg/translate-all.c
docs/devel/tcg.rst
linux-user/exit.c
linux-user/main.c
qemu-options.hx
softmmu/vl.c
tcg/tcg.c