Skip to content

tcg: add perfmap and jitdump

Ilya Leoshkevich qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesIn review
  2. v33 patches 4 repliesSuperseded
  3. v21 patch 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC1 patch4 repliesSuperseded

Changes in v4 from the cover letter

* s/unsigned long long/uint64_t/g (Richard).
* Fix address resolution with TARGET_TB_PCREL again.
* Open question: do we need something like get_pc_from_opc()? See FIXME in patch 3.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3linux-user: Clean up when exiting due to a signallinux-user/signal.c+5 -30 replies
2/3accel/tcg: Add debuginfo supportaccel/tcg/debuginfo.c accel/tcg/debuginfo.h accel/tcg/meson.build +4 more+191 -02 replies
3/3tcg: add perfmap and jitdumpaccel/tcg/meson.build accel/tcg/perf.c accel/tcg/perf.h +7 more+505 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchAlex BennéeRichard Henderson
1/3R-b R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] tcg: add perfmap and jitdump

v3:
https://lists.gnu.org/archive/html/qemu-devel/2023-01/msg02072.html

v3 -> v4:
* s/unsigned long long/uint64_t/g (Richard).
* Fix address resolution with TARGET_TB_PCREL again.
* Open question: do we need something like get_pc_from_opc()? See FIXME in patch 3.

v2:
https://lists.gnu.org/archive/html/qemu-devel/2022-11/msg02385.html
https://lists.gnu.org/archive/html/qemu-devel/2023-01/msg01026.html

v2 -> v3:
* Enable only for CONFIG_LINUX (Alex).
* Use qemu_get_thread_id() instead of gettid() (Alex).
* Fix CI (Alex).
https://gitlab.com/iii-i/qemu/-/pipelines/743684604
* Drop unnecessary #includes (Alex).
* Drop the constification change (Alex/Richard).
* Split debuginfo support into a separate patch.
* Fix partial perfmap/jitdump files when terminating due to a signal.
* Fix debuginfo strings being accessed outside of debuginfo lock.
* Fix address resolution with TARGET_TB_PCREL.
* Add DEBUGINFOD_URLS= to the doc; without it perf inject is unacceptably slow.
* Note: it's better to test this with the latest perf (6.2.rc3.g7dd4b804e080 worked fine for me). There has been at least one breakage in the JIT area recently (fixed by 6d518ac7be62).

v1:
https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg01824.html
https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg01073.html

v1 -> v2:
* Use QEMU_LOCK_GUARD (Alex).
* Handle TARGET_TB_PCREL (Alex).
* Support ELF -kernels, add a note about this (Alex). Tested with qemu-system-x86_64 and Linux kernel - it's not fast, but it works.
* Minor const correctness and style improvements.

Ilya Leoshkevich (3):
linux-user: Clean up when exiting due to a signal accel/tcg: Add debuginfo support
tcg: add perfmap and jitdump

 accel/tcg/debuginfo.c     |  96 ++++++++++
 accel/tcg/debuginfo.h     |  77 ++++++++
 accel/tcg/meson.build     |   2 +
 accel/tcg/perf.c          | 375 ++++++++++++++++++++++++++++++++++++++
 accel/tcg/perf.h          |  49 +++++
 accel/tcg/translate-all.c |   7 +
 docs/devel/tcg.rst        |  23 +++
 hw/core/loader.c          |   5 +
 linux-user/elfload.c      |   3 +
 linux-user/exit.c         |   2 +
 linux-user/main.c         |  15 ++
 linux-user/meson.build    |   1 +
 linux-user/signal.c       |   8 +-
 meson.build               |   8 +
 qemu-options.hx           |  20 ++
 softmmu/vl.c              |  11 ++
 tcg/tcg.c                 |   2 +
 17 files changed, 701 insertions(+), 3 deletions(-)
 create mode 100644 accel/tcg/debuginfo.c
 create mode 100644 accel/tcg/debuginfo.h
 create mode 100644 accel/tcg/perf.c
 create mode 100644 accel/tcg/perf.h
Signature · 1 line
2.39.0