diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2019-11-08 15:11:34 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2019-11-19 14:45:58 +0100 |
commit | 10f9f1fbed11e520e6fd71f02cd71f0e9c759b69 (patch) | |
tree | 138028d0bfcca678dea1da63bde346cf4fde8ffd /hw/block/pflash_cfi01.c | |
parent | 385e43e6638464009e09cfaec254012e531f6342 (diff) | |
download | qemu-10f9f1fbed11e520e6fd71f02cd71f0e9c759b69.zip qemu-10f9f1fbed11e520e6fd71f02cd71f0e9c759b69.tar.gz qemu-10f9f1fbed11e520e6fd71f02cd71f0e9c759b69.tar.bz2 |
hw/block/pflash: Remove dynamic field width from trace events
Since not all trace backends support dynamic field width in
format (dtrace via stap does not), replace by a static field
width instead.
We previously passed to the trace API 'width << 1' as the number
of hex characters to display (the dynamic field width). We don't
need this anymore. Instead, display the size of bytes accessed.
Fixes: e8aa2d95ea ("pflash: Simplify trace_pflash_io_read/write")
Fixes: c1474acd5d ("pflash: Simplify trace_pflash_data_read/write")
Reported-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Buglink: https://bugs.launchpad.net/qemu/+bug/1844817
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/block/pflash_cfi01.c')
-rw-r--r-- | hw/block/pflash_cfi01.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 566c0ac..54e6ebd 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -276,7 +276,7 @@ static uint32_t pflash_data_read(PFlashCFI01 *pfl, hwaddr offset, DPRINTF("BUG in %s\n", __func__); abort(); } - trace_pflash_data_read(offset, width << 1, ret); + trace_pflash_data_read(offset, width, ret); return ret; } @@ -389,7 +389,7 @@ static uint32_t pflash_read(PFlashCFI01 *pfl, hwaddr offset, break; } - trace_pflash_io_read(offset, width, width << 1, ret, pfl->cmd, pfl->wcycle); + trace_pflash_io_read(offset, width, ret, pfl->cmd, pfl->wcycle); return ret; } @@ -414,7 +414,7 @@ static inline void pflash_data_write(PFlashCFI01 *pfl, hwaddr offset, { uint8_t *p = pfl->storage; - trace_pflash_data_write(offset, width << 1, value, pfl->counter); + trace_pflash_data_write(offset, width, value, pfl->counter); switch (width) { case 1: p[offset] = value; @@ -453,7 +453,7 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset, cmd = value; - trace_pflash_io_write(offset, width, width << 1, value, pfl->wcycle); + trace_pflash_io_write(offset, width, value, pfl->wcycle); if (!pfl->wcycle) { /* Set the device in I/O access mode */ memory_region_rom_device_set_romd(&pfl->mem, false); |