diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-09-07 03:55:30 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-09-30 19:09:20 +0200 |
commit | 4d7b9a6373504cd75a589775fee9debf76912d39 (patch) | |
tree | c7daf8e8f95a7ab92564f3f51512621f8e4e997c | |
parent | 6ab9be1ec1267865c2f4c334668e05f5810b8836 (diff) |
hw/char/serial: Replace commented DPRINTF() by trace event
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>
Message-Id: <20200907015535.827885-3-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/char/serial.c | 4 | ||||
-rw-r--r-- | 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 840da89de7..e8029f840a 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 2442a9f7d5..17304bef26 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" |