Skip to content

trace type mismatch cleanups

Eric Blake qemu-devel 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest30 patches 20 repliesApplied
  2. v11 patch 6 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/30trace: Fix backwards mirror_yield parametersblock/mirror.c+3 -21 reply
2/30trace: Fix incorrect megasas trace parametershw/scsi/megasas.c+3 -32 replies
3/30trace: Avoid abuse of amdvi_mmio_readhw/i386/amd_iommu.c hw/i386/trace-events+2 -22 replies
4/30trace: Fix parameter types in blockblock/trace-events+2 -20 replies
5/30trace: Fix parameter types in ioio/channel-command.c+1 -10 replies
6/30trace: Fix parameter types in migrationmigration/trace-events+2 -26 replies
7/30trace: Fix parameter types in uiui/trace-events+4 -41 reply
8/30trace: Fix parameter types in top levelcpu-exec.c trace-events translate-all.c+5 -50 replies
9/30trace: Fix parameter types in linux-userlinux-user/signal.c+53 -530 replies
10/30trace: Fix parameter types in hw/acpihw/acpi/trace-events+3 -30 replies
11/30trace: Fix parameter types in hw/audiohw/audio/trace-events+4 -42 replies
12/30trace: Fix parameter types in hw/blockhw/block/virtio-blk.c+2 -20 replies
13/30trace: Fix parameter types in hw/charhw/char/escc.c hw/char/trace-events+9 -90 replies
14/30trace: Fix parameter types in hw/displayhw/display/trace-events+10 -100 replies
15/30trace: Fix parameter types in hw/dmahw/dma/trace-events+4 -40 replies
16/30trace: Fix parameter types in hw/i386hw/i386/trace-events+1 -10 replies
17/30trace: Fix parameter types in hw/inputhw/input/trace-events+2 -20 replies
18/30trace: Fix parameter types in hw/intchw/intc/apic_common.c hw/intc/trace-events+21 -210 replies
19/30trace: Fix parameter types in hw/isahw/isa/trace-events+2 -20 replies
20/30trace: Fix parameter types in hw/mischw/misc/trace-events+22 -220 replies
21/30trace: Fix parameter types in hw/nethw/net/e1000e_core.c hw/net/trace-events+34 -341 reply
22/30trace: Fix parameter types in hw/nvramhw/nvram/fw_cfg.c hw/nvram/trace-events+3 -30 replies
23/30trace: Fix parameter types in hw/ppchw/ppc/trace-events+8 -80 replies
24/30trace: Fix parameter types in hw/sdhw/sd/trace-events+2 -20 replies
25/30trace: Fix parameter types in hw/scsihw/scsi/esp-pci.c hw/scsi/megasas.c hw/scsi/trace-events+63 -611 reply
26/30trace: Fix parameter types in hw/timerhw/timer/grlib_gptimer.c hw/timer/trace-events+10 -100 replies
27/30trace: Fix parameter types in hw/usbhw/usb/hcd-ehci.c hw/usb/hcd-xhci.c hw/usb/trace-events+49 -481 reply
28/30trace: Fix parameter types in hw/vfiohw/vfio/pci.c hw/vfio/trace-events+9 -80 replies
29/30trace: Fix parameter types in hw/virtiohw/virtio/trace-events+1 -11 reply
30/30trace: Force compiler warnings on trace parameter type mismatchesscripts/tracetool/format/h.py+13 -02 replies

Reviews trailers per patch

6 of 30 patches have a Reviewed-by or Acked-by.

PatchHannes ReineckeDmitry FleytmanGerd Hoffmann
1/30
2/30R-b
3/30
4/30
5/30
6/30
7/30R-b
8/30
9/30
10/30
11/30R-b
12/30
13/30
14/30
15/30
16/30
17/30
18/30
19/30
20/30
21/30R-b
22/30
23/30
24/30
25/30R-b
26/30
27/30R-b
28/30
29/30
30/30

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH for-2.9 v2 00/30] trace type mismatch cleanups

We have a number of tracepoints that mistakenly truncate 64-bit values into 32-bit printouts, making the trace less useful than what is fully possible.

Previously posted patch 1 here:
https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg01918.html

At which point I realized the problem may be more pervasive, so I started a much bigger audit (aided by patch 30 of this series).

Proposing the (bulk of this) series for 2.9. Patches 1-3 are ready to go, and definitely belong in 2.9 as bug-fixes; 4-29 can probably be treated as bug-fixes and included per maintainer discretion, but may need further tweaks on platforms with different typing setups than what I tested with (for example, I have not attempted a 32-bit build, which will likely flag some additional misuse of "%lx" that should have been "%"PRIx64, and I know that mingw still trips things up).

Patch 30 is NOT 2.9 material - it has too much risk of causing compilation failures on platforms with different types, where the current behavior of just (silently) switching between types allows compilation (even if it is not accurate traces). But if we like the approach, there are enough potential merge-conflict magnets that the overall series should probably go early into 2.10 (other than the bug-fixes picked into 2.9), and patch 30 is essential to keeping us from regressing into future type mismatches.

Eric Blake (30):
trace: Fix backwards mirror_yield parameters
trace: Fix incorrect megasas trace parameters
trace: Avoid abuse of amdvi_mmio_read
trace: Fix parameter types in block
trace: Fix parameter types in io
trace: Fix parameter types in migration
trace: Fix parameter types in ui
trace: Fix parameter types in top level
trace: Fix parameter types in linux-user
trace: Fix parameter types in hw/acpi
trace: Fix parameter types in hw/audio
trace: Fix parameter types in hw/block
trace: Fix parameter types in hw/char
trace: Fix parameter types in hw/display
trace: Fix parameter types in hw/dma
trace: Fix parameter types in hw/i386
trace: Fix parameter types in hw/input
trace: Fix parameter types in hw/intc
trace: Fix parameter types in hw/isa
trace: Fix parameter types in hw/misc
trace: Fix parameter types in hw/net
trace: Fix parameter types in hw/nvram
trace: Fix parameter types in hw/ppc
trace: Fix parameter types in hw/sd
trace: Fix parameter types in hw/scsi
trace: Fix parameter types in hw/timer
trace: Fix parameter types in hw/usb
trace: Fix parameter types in hw/vfio
trace: Fix parameter types in hw/virtio
trace: Force compiler warnings on trace parameter type mismatches

 scripts/tracetool/format/h.py |  13 +++++
 block/mirror.c                |   5 +-
 cpu-exec.c                    |   6 +--
 hw/block/virtio-blk.c         |   4 +-
 hw/char/escc.c                |   4 +-
 hw/i386/amd_iommu.c           |   3 +-
 hw/intc/apic_common.c         |   2 +-
 hw/net/e1000e_core.c          |  10 ++--
 hw/nvram/fw_cfg.c             |   2 +-
 hw/scsi/esp-pci.c             |   2 +-
 hw/scsi/megasas.c             |  14 +++---
 hw/timer/grlib_gptimer.c      |   6 +--
 hw/usb/hcd-ehci.c             |   9 ++--
 hw/usb/hcd-xhci.c             |   4 +-
 hw/vfio/pci.c                 |   3 +-
 io/channel-command.c          |   2 +-
 linux-user/signal.c           | 106 +++++++++++++++++++--------------------
 translate-all.c               |   2 +-
 block/trace-events            |   4 +-
 hw/acpi/trace-events          |   6 +--
 hw/audio/trace-events         |   8 +--
 hw/char/trace-events          |  14 +++---
 hw/display/trace-events       |  20 ++++----
 hw/dma/trace-events           |   8 +--
 hw/i386/trace-events          |   3 +-
 hw/input/trace-events         |   4 +-
 hw/intc/trace-events          |  40 +++++++--------
 hw/isa/trace-events           |   4 +-
 hw/misc/trace-events          |  44 ++++++++--------
 hw/net/trace-events           |  58 ++++++++++-----------
 hw/nvram/trace-events         |   4 +-
 hw/ppc/trace-events           |  16 +++---
 hw/scsi/trace-events          | 114 +++++++++++++++++++++---------------------
 hw/sd/trace-events            |   4 +-
 hw/timer/trace-events         |  14 +++---
 hw/usb/trace-events           |  84 +++++++++++++++----------------
 hw/vfio/trace-events          |  14 +++---
 hw/virtio/trace-events        |   2 +-
 migration/trace-events        |   4 +-
 trace-events                  |   2 +-
 ui/trace-events               |   8 +--
 41 files changed, 347 insertions(+), 329 deletions(-)
Signature · 1 line
2.9.3