[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/timer/hpet: Convert DPRINTF to trace events
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
Re: [PATCH] hw/timer/hpet: Convert DPRINTF to trace events |
|
Date: |
Wed, 17 Jan 2024 09:26:55 +0100 |
|
User-agent: |
Mozilla Thunderbird |
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 <dhoff749@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é <philmd@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;
}
}
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] hw/timer/hpet: Convert DPRINTF to trace events,
Philippe Mathieu-Daudé <=