[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/11] hw/input/tsc2005: Convert a fprintf() call to
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 06/11] hw/input/tsc2005: Convert a fprintf() call to trace events |
Date: |
Fri, 29 Jun 2018 18:53:25 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/input/tsc2005.c | 7 +++----
hw/input/trace-events | 3 +++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c
index 4dd95596ab..2b9108a193 100644
--- a/hw/input/tsc2005.c
+++ b/hw/input/tsc2005.c
@@ -24,6 +24,7 @@
#include "qemu/timer.h"
#include "ui/console.h"
#include "hw/devices.h"
+#include "trace.h"
#define TSC_CUT_RESOLUTION(value, p) ((value) >> (16 - (p ? 12 : 10)))
@@ -201,8 +202,7 @@ static void tsc2005_write(TSC2005State *s, int reg,
uint16_t data)
s->host_mode = (data >> 15) != 0;
if (s->enabled != !(data & 0x4000)) {
s->enabled = !(data & 0x4000);
- fprintf(stderr, "%s: touchscreen sense %sabled\n",
- __func__, s->enabled ? "en" : "dis");
+ trace_tsc2005_sense(s->enabled ? "enabled" : "disabled");
if (s->busy && !s->enabled)
timer_del(s->timer);
s->busy = s->busy && s->enabled;
@@ -340,8 +340,7 @@ static uint8_t tsc2005_txrx_word(void *opaque, uint8_t
value)
s->nextprecision = (value >> 2) & 1;
if (s->enabled != !(value & 1)) {
s->enabled = !(value & 1);
- fprintf(stderr, "%s: touchscreen sense %sabled\n",
- __func__, s->enabled ? "en" : "dis");
+ trace_tsc2005_sense(s->enabled ? "enabled" : "disabled");
if (s->busy && !s->enabled)
timer_del(s->timer);
s->busy = s->busy && s->enabled;
diff --git a/hw/input/trace-events b/hw/input/trace-events
index db72484a25..3965a842ae 100644
--- a/hw/input/trace-events
+++ b/hw/input/trace-events
@@ -41,5 +41,8 @@ milkymist_softusb_pulse_irq(void) "Pulse IRQ"
hid_kbd_queue_full(void) "queue full"
hid_kbd_queue_empty(void) "queue empty"
+# hw/input/tsc2005.c
+tsc2005_sense(const char *state) "touchscreen sense %s"
+
# hw/input/virtio
virtio_input_queue_full(void) "queue full"
--
2.17.1
- [Qemu-devel] [PULL 00/11] Tracing patches, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 01/11] simpletrace: Convert name from mapping record to str, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 02/11] trace: Fix format string for the struct timeval members casted to size_t, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 03/11] sdcard: Reduce sdcard_set_blocklen() trace digits, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 04/11] hw/char/serial: Convert from DPRINTF macro to trace events, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 05/11] hw/char/parallel: Convert from pdebug() macro to trace events, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 07/11] hw/net/ne2000: Add trace events, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 06/11] hw/input/tsc2005: Convert a fprintf() call to trace events,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 10/11] hw/block/fdc: Convert from FLOPPY_DPRINTF() macro to trace events, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 08/11] hw/net/ne2000: Convert printf() calls to trace events, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 09/11] hw/net/etraxfs_eth: Convert printf() calls to trace events, Stefan Hajnoczi, 2018/06/29
- [Qemu-devel] [PULL 11/11] hw/block/pflash_cfi: Convert from DPRINTF() macro to trace events, Stefan Hajnoczi, 2018/06/29
- Re: [Qemu-devel] [PULL 00/11] Tracing patches, Peter Maydell, 2018/06/30