Hi Daniel,
On 19/11/23 00:11, Daniel Hoffman wrote:
This conversion is pretty straight-forward. Standardized some formatting
so the +0 and +4 offset cases can recycle the same message.
Signed-off-by: Daniel Hoffman <dhoff...@gmail.com>
---
hw/timer/hpet.c | 55 +++++++++++++++++--------------------------
hw/timer/trace-events | 16 +++++++++++++
2 files changed, 38 insertions(+), 33 deletions(-)
@@ -643,24 +636,20 @@ static void hpet_ram_write(void *opaque, hwaddr addr,
break;
case HPET_COUNTER:
if (hpet_enabled(s)) {
- DPRINTF("qemu: Writing counter while HPET enabled!\n");
+ trace_hpet_ram_write_counter_write_while_enabled();
Better would be to call qemu_log_mask(LOG_GUEST_ERROR) here IMO.
}
s->hpet_counter =
(s->hpet_counter & 0xffffffff00000000ULL) | value;
- DPRINTF("qemu: HPET counter written. ctr = 0x%" PRIx64 " -> "
- "%" PRIx64 "\n", value, s->hpet_counter);
+ trace_hpet_ram_write_counter_written(0, value, s->hpet_counter);
break;
case HPET_COUNTER + 4:
- if (hpet_enabled(s)) {
- DPRINTF("qemu: Writing counter while HPET enabled!\n");
- }
+ trace_hpet_ram_write_counter_write_while_enabled();
Ditto.
Can be done on top in another patch, so meanwhile:
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
And patch queued, thanks!
s->hpet_counter =
(s->hpet_counter & 0xffffffffULL) | (((uint64_t)value) << 32);
- DPRINTF("qemu: HPET counter + 4 written. ctr = 0x%" PRIx64 " -> "
- "%" PRIx64 "\n", value, s->hpet_counter);
+ trace_hpet_ram_write_counter_written(4, value, s->hpet_counter);
break;
default:
- DPRINTF("qemu: invalid hpet_ram_writel\n");
+ trace_hpet_ram_write_invalid();
break;
}
}