[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/16] gtk: Replace conditional debug messages by tra
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 15/16] gtk: Replace conditional debug messages by trace methods |
Date: |
Wed, 13 Nov 2013 17:01:19 +0400 |
From: Stefan Weil <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
trace-events | 5 +++++
ui/gtk.c | 19 +++++--------------
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/trace-events b/trace-events
index d196234..bc6788f 100644
--- a/trace-events
+++ b/trace-events
@@ -1022,6 +1022,11 @@ displaychangelistener_register(void *dcl, const char
*name) "%p [ %s ]"
displaychangelistener_unregister(void *dcl, const char *name) "%p [ %s ]"
ppm_save(const char *filename, void *display_surface) "%s surface=%p"
+# ui/gtk.c
+gd_switch(int width, int height) "width=%d, height=%d"
+gd_update(int x, int y, int w, int h) "x=%d, y=%d, w=%d, h=%d"
+gd_key_event(int gdk_keycode, int qemu_keycode, const char *action)
"translated GDK keycode %d to QEMU keycode %d (%s)"
+
# hw/display/vmware_vga.c
vmware_value_read(uint32_t index, uint32_t value) "index %d, value 0x%x"
vmware_value_write(uint32_t index, uint32_t value) "index %d, value 0x%x"
diff --git a/ui/gtk.c b/ui/gtk.c
index b5f4f0b..6316f5b 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -53,6 +53,7 @@
#include <vte/vte.h>
#include <math.h>
+#include "trace.h"
#include "ui/console.h"
#include "sysemu/sysemu.h"
#include "qmp-commands.h"
@@ -60,14 +61,6 @@
#include "keymaps.h"
#include "sysemu/char.h"
-//#define DEBUG_GTK
-
-#ifdef DEBUG_GTK
-#define DPRINTF(fmt, ...) printf(fmt, ## __VA_ARGS__)
-#else
-#define DPRINTF(fmt, ...) do { } while (0)
-#endif
-
#define MAX_VCS 10
@@ -302,7 +295,7 @@ static void gd_update(DisplayChangeListener *dcl,
int fbw, fbh;
int ww, wh;
- DPRINTF("update(x=%d, y=%d, w=%d, h=%d)\n", x, y, w, h);
+ trace_gd_update(x, y, w, h);
if (s->convert) {
pixman_image_composite(PIXMAN_OP_SRC, s->ds->image, NULL, s->convert,
@@ -396,8 +389,7 @@ static void gd_switch(DisplayChangeListener *dcl,
GtkDisplayState *s = container_of(dcl, GtkDisplayState, dcl);
bool resized = true;
- DPRINTF("resize(width=%d, height=%d)\n",
- surface_width(surface), surface_height(surface));
+ trace_gd_switch(surface_width(surface), surface_height(surface));
if (s->surface) {
cairo_surface_destroy(s->surface);
@@ -732,9 +724,8 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey
*key, void *opaque)
qemu_keycode = 0;
}
- DPRINTF("translated GDK keycode %d to QEMU keycode %d (%s)\n",
- gdk_keycode, qemu_keycode,
- (key->type == GDK_KEY_PRESS) ? "down" : "up");
+ trace_gd_key_event(gdk_keycode, qemu_keycode,
+ (key->type == GDK_KEY_PRESS) ? "down" : "up");
for (i = 0; i < ARRAY_SIZE(modifier_keycode); i++) {
if (qemu_keycode == modifier_keycode[i]) {
--
1.7.10.4
- [Qemu-devel] [PULL 00/16] [for-1.7] Trivial patches for 2013-11-13, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 02/16] qemu-char: add Czech keymap file, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 10/16] qga: Fix compilation for old versions of MinGW, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 01/16] qemu-char: add Czech characters to VNC keysyms, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 03/16] qemu-char: add support for U-prefixed symbols, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 04/16] qemu-char: add missing characters used in keymaps, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 07/16] qapi: Fix comment for create-type to match code., Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 13/16] trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies), Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 11/16] console: Remove unused debug code, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 15/16] gtk: Replace conditional debug messages by trace methods,
Michael Tokarev <=
- [Qemu-devel] [PULL 09/16] .travis.yml: basic compile and check recipes, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 06/16] vl: fix build when configured with no graphic support, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 05/16] usb: drop unused USBNetState.inpkt field, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 16/16] qga: Fix shutdown command of guest agent to work with SysV, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 12/16] trace: Remove trace.h from console.h (less dependencies), Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 14/16] console: Replace conditional debug messages by trace methods, Michael Tokarev, 2013/11/13
- [Qemu-devel] [PULL 08/16] pci-assign: Fix error_report of pci-stub message, Michael Tokarev, 2013/11/13
- Re: [Qemu-devel] [PULL 00/16] [for-1.7] Trivial patches for 2013-11-13, Stefan Weil, 2013/11/13