Skip to contentSkip to conversation

console: add some trace events

PATCH New Alon Levy 1 participant 2 messages Mar 11, 2012

lore
Share & tools
lore

Alon Levy

author
#0 lore raw

PATCH 1/2 console: add some trace events

---
 console.h    |    3 +++
 trace-events |    4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)
console.h +3 -0
index a95b581..4334db5 100644
@@ -5,6 +5,7 @@
 #include "qdict.h"
 #include "notify.h"
 #include "monitor.h"
+#include "trace.h"
 
 /* keyboard/mouse support */
 
@@ -202,11 +203,13 @@ static inline DisplaySurface* qemu_create_displaysurface(DisplayState *ds, int w
 
 static inline DisplaySurface* qemu_resize_displaysurface(DisplayState *ds, int width, int height)
 {
+    trace_displaysurface_resize(ds, ds->surface, width, height);
     return ds->allocator->resize_displaysurface(ds->surface, width, height);
 }
 
 static inline void qemu_free_displaysurface(DisplayState *ds)
 {
+    trace_displaysurface_free(ds, ds->surface);
     ds->allocator->free_displaysurface(ds->surface);
 }
 
trace-events +4 -0
index c5d0f0f..94c4a6f 100644
@@ -658,3 +658,7 @@ dma_aio_cancel(void *dbs) "dbs=%p"
 dma_complete(void *dbs, int ret, void *cb) "dbs=%p ret=%d cb=%p"
 dma_bdrv_cb(void *dbs, int ret) "dbs=%p ret=%d"
 dma_map_wait(void *dbs) "dbs=%p"
+
+# console.h
+displaysurface_free(void *display_state, void *display_surface) "state=%p surface=%p"
+displaysurface_resize(void *display_state, void *display_surface, int width, int height) "state=%p surface=%p %dx%d"
Signature · 1 line
1.7.9.1
author
#1 lore raw

PATCH 2/2 vga: add trace event for ppm_save

---
 hw/vga.c     |    2 ++
 trace-events |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
hw/vga.c +2 -0
index 5994f43..6dc98f6 100644
@@ -30,6 +30,7 @@
 #include "pixel_ops.h"
 #include "qemu-timer.h"
 #include "xen.h"
+#include "trace.h"
 
 //#define DEBUG_VGA
 //#define DEBUG_VGA_MEM
@@ -2372,6 +2373,7 @@ int ppm_save(const char *filename, struct DisplaySurface *ds)
     int ret;
     char *linebuf, *pbuf;
 
+    trace_ppm_save(filename, ds);
     f = fopen(filename, "wb");
     if (!f)
         return -1;
trace-events +3 -0
index 94c4a6f..dfe28ed 100644
@@ -662,3 +662,6 @@ dma_map_wait(void *dbs) "dbs=%p"
 # console.h
 displaysurface_free(void *display_state, void *display_surface) "state=%p surface=%p"
 displaysurface_resize(void *display_state, void *display_surface, int width, int height) "state=%p surface=%p %dx%d"
+
+# vga.c
+ppm_save(const char *filename, void *display_surface) "%s surface=%p"
Signature · 1 line
1.7.9.1