Skip to content

trace: make systemtap easier to use for simple logging

Daniel P. Berrangé qemu-devel 3 versions – Applied

Status from this message: Thanks, applied to my tracing tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyApplied
  2. v34 patches 4 repliesSuperseded
  3. v24 patches 20 repliesSuperseded

Changes in v4 from the cover letter

- Fix license to be GPLv2-or-later (Eric)
- Misc typo fixes (Eric)

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4display: ensure qxl log_buf is a nul terminated stringhw/display/qxl.c hw/display/trace-events+11 -50 replies
2/4trace: enforce that every trace-events file has a final newlinehw/gpio/trace-events scripts/tracetool/__init__.py+3 -10 replies
3/4trace: forbid use of %m in trace event format stringshw/vfio/pci.c hw/vfio/trace-events scripts/tracetool/__init__.py+6 -20 replies
4/4trace: add ability to do simple printf logging via systemtapMAINTAINERS Makefile Makefile.target +4 more+467 -10 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchEric BlakeStefan Hajnoczi
1/4R-b
2/4R-b R-b
3/4R-b
4/4R-b

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

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 0/4] trace: make systemtap easier to use for simple logging

This is a followup to

v1: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg04173.html
v2: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg04759.html
v3: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg05477.html

Changed in v4:

- Fix license to be GPLv2-or-later (Eric)
- Misc typo fixes (Eric)

Changed in v3:

- g_strndup the QXL log_buf before printing to avoid a race with guest removing the nul terminator (Stefan)
- Add filtering of PIDs with "-p PID" arg to qemu-trace-stap
- Add a man page for qemu-trace-stap (Eric)
- Remove examples in docs/devel/tracing.txt and just refer people to the above man page.
- Use strerror(errno) instead of raw errno in vfio traces (Eric/Alex)
- Quote probe wildcards to be shell glob safe (Eric)
- Mention explicitly that it is launched separately from QEMU (Eric)

Changed in v2:

- Fix safety of QXL logging
- Handle format specifier macros is a more reliable manner
- Fix trace-events files missing newline
- Remove use of %m formats

Daniel P. Berrangé (4):
display: ensure qxl log_buf is a nul terminated string
trace: enforce that every trace-events file has a final newline
trace: forbid use of %m in trace event format strings
trace: add ability to do simple printf logging via systemtap

 MAINTAINERS                          |   1 +
 Makefile                             |  10 ++
 Makefile.target                      |  11 +-
 docs/devel/tracing.txt               |   4 +
 hw/display/qxl.c                     |  14 ++-
 hw/display/trace-events              |   2 +-
 hw/gpio/trace-events                 |   2 +-
 hw/vfio/pci.c                        |   2 +-
 hw/vfio/trace-events                 |   2 +-
 scripts/qemu-trace-stap              | 175 +++++++++++++++++++++++++++
 scripts/qemu-trace-stap.texi         | 140 +++++++++++++++++++++
 scripts/tracetool/__init__.py        |   6 +
 scripts/tracetool/format/log_stap.py | 127 +++++++++++++++++++
 13 files changed, 487 insertions(+), 9 deletions(-)
 create mode 100755 scripts/qemu-trace-stap
 create mode 100644 scripts/qemu-trace-stap.texi
 create mode 100644 scripts/tracetool/format/log_stap.py
Signature · 1 line
2.20.1