diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2023-01-17 10:24:15 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-01-17 10:24:16 +0000 |
commit | 7c9236d6d61f30583d5d860097d88dbf0fe487bf (patch) | |
tree | b09f19c2a9060626eeed519d11eb559a106698a3 /docs/devel/tcg.rst | |
parent | 2f8d6a88e44928e1afaab5fd37fafefc94bf395c (diff) | |
parent | 61710a7e23a63546da0071ea32adb96476fa5d07 (diff) | |
download | qemu-7c9236d6d61f30583d5d860097d88dbf0fe487bf.zip qemu-7c9236d6d61f30583d5d860097d88dbf0fe487bf.tar.gz qemu-7c9236d6d61f30583d5d860097d88dbf0fe487bf.tar.bz2 |
Merge tag 'pull-tcg-20230116' of https://gitlab.com/rth7680/qemu into staging
- Reorg cpu_tb_exec around setjmp.
- Use __attribute__((target)) for buffer_is_zero.
- Add perfmap and jitdump for perf support.
# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmPFtXgdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+62Af/YLdd77+IO8wcPN1n
# 2esKNlrrYQ2/x40Hede6L4pp+Qz6M810YgNbhMchBS3u8YGIFzmVLaiz5N4nBGTq
# ricOit6Jj2KonlxWaxgma1BW36ydBIwphC20WjrLTVgdNGvxmy4JKbfklTd4oIZ+
# +Kf1VTN1bbt7vfDntd454ck2rhtVZBEvYTynikA3LJ1W7EVN5etDUnrN3VwbaTTK
# 0aY8MbDfGUASyrDzmaRcF5F90K+V2STuEUs1whgOuTBusZ6n3+FSDhW8CuDhsy/l
# rXtPkQba3rtUWfJ1+o7bx3Gg4nbfn/9lxIfGwhQ79ywD9InjqLqu9etwVyhijx+n
# k+tvPw==
# =xFfF
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 16 Jan 2023 20:37:12 GMT
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* tag 'pull-tcg-20230116' of https://gitlab.com/rth7680/qemu:
accel/tcg: Split out cpu_exec_{setjmp,loop}
util/bufferiszero: Use __attribute__((target)) for avx2/avx512
tcg: add perfmap and jitdump
accel/tcg: Add debuginfo support
linux-user: Clean up when exiting due to a signal
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs/devel/tcg.rst')
-rw-r--r-- | docs/devel/tcg.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/devel/tcg.rst b/docs/devel/tcg.rst index 136a7a0..b4096a1 100644 --- a/docs/devel/tcg.rst +++ b/docs/devel/tcg.rst @@ -188,3 +188,26 @@ memory areas instead calls out to C code for device emulation. Finally, the MMU helps tracking dirty pages and pages pointed to by translation blocks. +Profiling JITted code +--------------------- + +The Linux ``perf`` tool will treat all JITted code as a single block as +unlike the main code it can't use debug information to link individual +program counter samples with larger functions. To overcome this +limitation you can use the ``-perfmap`` or the ``-jitdump`` option to generate +map files. ``-perfmap`` is lightweight and produces only guest-host mappings. +``-jitdump`` additionally saves JITed code and guest debug information (if +available); its output needs to be integrated with the ``perf.data`` file +before the final report can be viewed. + +.. code:: + + perf record $QEMU -perfmap $REMAINING_ARGS + perf report + + perf record -k 1 $QEMU -jitdump $REMAINING_ARGS + DEBUGINFOD_URLS= perf inject -j -i perf.data -o perf.data.jitted + perf report -i perf.data.jitted + +Note that qemu-system generates mappings only for ``-kernel`` files in ELF +format. |