mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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>
This commit is contained in:
committed by
Richard Henderson
parent
7c10cb38cc
commit
5584e2dbe8
@@ -17,6 +17,7 @@
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "accel/tcg/perf.h"
|
||||
#include "exec/gdbstub.h"
|
||||
#include "qemu.h"
|
||||
#include "user-internals.h"
|
||||
@@ -38,4 +39,5 @@ void preexit_cleanup(CPUArchState *env, int code)
|
||||
#endif
|
||||
gdb_exit(code);
|
||||
qemu_plugin_user_exit();
|
||||
perf_exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user