From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Daniel Hoffman <dhoff749@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] hw/timer/hpet: Convert DPRINTF to trace events
Date: Wed, 17 Jan 2024 09:26:55 +0100 [thread overview]
Message-ID: <f0a0eee0-48c7-4019-b767-9de31f663b1e@linaro.org> (raw)
In-Reply-To: <20231118231129.2840388-1-dhoff749@gmail.com>
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 parent reply other threads:[~2024-01-17 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 23:11 [PATCH] hw/timer/hpet: Convert DPRINTF to trace events Daniel Hoffman
2023-11-22 1:42 ` Dan Hoffman
2024-01-17 8:26 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0a0eee0-48c7-4019-b767-9de31f663b1e@linaro.org \
--to=philmd@linaro.org \
--cc=dhoff749@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).