qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-trivial@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH 2/7] hw/char/serial: Replace commented DPRINTF() by trace event
Date: Mon,  7 Sep 2020 03:55:30 +0200	[thread overview]
Message-ID: <20200907015535.827885-3-f4bug@amsat.org> (raw)
In-Reply-To: <20200907015535.827885-1-f4bug@amsat.org>

Convert the old debug PRINTF() call to display the UART
baudrate to a trace event.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/char/serial.c     | 4 +---
 hw/char/trace-events | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index a855ef66ea2..fb41337b661 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -187,9 +187,7 @@ static void serial_update_parameters(SerialState *s)
     ssp.stop_bits = stop_bits;
     s->char_transmit_time =  (NANOSECONDS_PER_SECOND / speed) * frame_size;
     qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_SET_PARAMS, &ssp);
-
-    DPRINTF("speed=%.2f parity=%c data=%d stop=%d\n",
-           speed, parity, data_bits, stop_bits);
+    trace_serial_update_parameters(speed, parity, data_bits, stop_bits);
 }
 
 static void serial_update_msl(SerialState *s)
diff --git a/hw/char/trace-events b/hw/char/trace-events
index d20eafd56f8..85e39d9d62b 100644
--- a/hw/char/trace-events
+++ b/hw/char/trace-events
@@ -7,6 +7,7 @@ parallel_ioport_write(const char *desc, uint16_t addr, uint8_t value) "write [%s
 # serial.c
 serial_ioport_read(uint16_t addr, uint8_t value) "read addr 0x%02x val 0x%02x"
 serial_ioport_write(uint16_t addr, uint8_t value) "write addr 0x%02x val 0x%02x"
+serial_update_parameters(uint64_t baudrate, char parity, int data_bits, int stop_bits) "baudrate=%"PRIu64" parity='%c' data=%d stop=%d"
 
 # virtio-serial-bus.c
 virtio_serial_send_control_event(unsigned int port, uint16_t event, uint16_t value) "port %u, event %u, value %u"
-- 
2.26.2



  parent reply	other threads:[~2020-09-07  1:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  1:55 [PATCH 0/7] hw/char/serial: Housekeeping Philippe Mathieu-Daudé
2020-09-07  1:55 ` [PATCH 1/7] hw/char/serial: Assert serial_ioport_read/write offset fits 8 bytes Philippe Mathieu-Daudé
2020-09-11 23:06   ` Richard Henderson
2020-09-07  1:55 ` Philippe Mathieu-Daudé [this message]
2020-09-07  1:55 ` [PATCH 3/7] hw/char/serial: Remove old DEBUG_SERIAL commented code Philippe Mathieu-Daudé
2020-09-07  1:55 ` [PATCH 4/7] hw/char/serial: Rename I/O read/write trace events Philippe Mathieu-Daudé
2020-09-11 23:08   ` Richard Henderson
2020-09-07  1:55 ` [PATCH 5/7] hw/char/serial: Make 'wakeup' property boolean Philippe Mathieu-Daudé
2020-09-11 23:10   ` Richard Henderson
2020-09-07  1:55 ` [PATCH 6/7] hw/char/serial-isa: Alias QDEV properties from generic serial object Philippe Mathieu-Daudé
2020-09-11 23:11   ` Richard Henderson
2020-09-07  1:55 ` [PATCH 7/7] hw/char/serial: Let SerialState have an 'id' field Philippe Mathieu-Daudé
2020-09-12  9:14   ` Paolo Bonzini
2020-09-12 11:28     ` Philippe Mathieu-Daudé
2020-09-12 11:33       ` Philippe Mathieu-Daudé
2020-09-12 16:18         ` Paolo Bonzini

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=20200907015535.827885-3-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.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).