render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone

Blame 0426-qxl-qxl_render.c-add-trace-events.patch

Hans de Goede 56753f
From 6b3e0d7afd011b8d40207fe45f6518937df1d99e Mon Sep 17 00:00:00 2001
Hans de Goede 56753f
From: Alon Levy <alevy@redhat.com>
Hans de Goede 56753f
Date: Sun, 18 Mar 2012 13:46:15 +0100
Hans de Goede 56753f
Subject: [PATCH 426/434] qxl/qxl_render.c: add trace events
Hans de Goede 56753f
Hans de Goede 56753f
Signed-off-by: Alon Levy <alevy@redhat.com>
Hans de Goede 56753f
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Hans de Goede 56753f
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hans de Goede 56753f
Hans de Goede 56753f
Cherry-pick: Added missing include "trace.h"
Hans de Goede 56753f
---
Hans de Goede 56753f
 hw/qxl-render.c |   14 +++++---------
Hans de Goede 56753f
 trace-events    |    7 +++++++
Hans de Goede 56753f
 2 files changed, 12 insertions(+), 9 deletions(-)
Hans de Goede 56753f
Hans de Goede 56753f
diff --git a/hw/qxl-render.c b/hw/qxl-render.c
Hans de Goede 56753f
index 2e10e93..835dc5e 100644
Hans de Goede 56753f
--- a/hw/qxl-render.c
Hans de Goede 56753f
+++ b/hw/qxl-render.c
Hans de Goede 56753f
@@ -20,6 +20,7 @@
Hans de Goede 56753f
  */
Hans de Goede 56753f
 
Hans de Goede 56753f
 #include "qxl.h"
Hans de Goede 56753f
+#include "trace.h"
Hans de Goede 56753f
 
Hans de Goede 56753f
 static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect)
Hans de Goede 56753f
 {
Hans de Goede 56753f
@@ -31,11 +32,10 @@ static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect)
Hans de Goede 56753f
         return;
Hans de Goede 56753f
     }
Hans de Goede 56753f
     if (!qxl->guest_primary.data) {
Hans de Goede 56753f
-        dprint(qxl, 1, "%s: initializing guest_primary.data\n", __func__);
Hans de Goede 56753f
+        trace_qxl_render_blit_guest_primary_initialized();
Hans de Goede 56753f
         qxl->guest_primary.data = memory_region_get_ram_ptr(&qxl->vga.vram);
Hans de Goede 56753f
     }
Hans de Goede 56753f
-    dprint(qxl, 2, "%s: stride %d, [%d, %d, %d, %d]\n", __func__,
Hans de Goede 56753f
-            qxl->guest_primary.qxl_stride,
Hans de Goede 56753f
+    trace_qxl_render_blit(qxl->guest_primary.qxl_stride,
Hans de Goede 56753f
             rect->left, rect->right, rect->top, rect->bottom);
Hans de Goede 56753f
     src = qxl->guest_primary.data;
Hans de Goede 56753f
     if (qxl->guest_primary.qxl_stride < 0) {
Hans de Goede 56753f
@@ -107,8 +107,7 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
Hans de Goede 56753f
         qxl->guest_primary.data = memory_region_get_ram_ptr(&qxl->vga.vram);
Hans de Goede 56753f
         qxl_set_rect_to_surface(qxl, &qxl->dirty[0]);
Hans de Goede 56753f
         qxl->num_dirty_rects = 1;
Hans de Goede 56753f
-        dprint(qxl, 1, "%s: %dx%d, stride %d, bpp %d, depth %d\n",
Hans de Goede 56753f
-               __FUNCTION__,
Hans de Goede 56753f
+        trace_qxl_render_guest_primary_resized(
Hans de Goede 56753f
                qxl->guest_primary.surface.width,
Hans de Goede 56753f
                qxl->guest_primary.surface.height,
Hans de Goede 56753f
                qxl->guest_primary.qxl_stride,
Hans de Goede 56753f
@@ -118,8 +117,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
Hans de Goede 56753f
     if (surface->width != qxl->guest_primary.surface.width ||
Hans de Goede 56753f
         surface->height != qxl->guest_primary.surface.height) {
Hans de Goede 56753f
         if (qxl->guest_primary.qxl_stride > 0) {
Hans de Goede 56753f
-            dprint(qxl, 1, "%s: using guest_primary for displaysurface\n",
Hans de Goede 56753f
-                   __func__);
Hans de Goede 56753f
             qemu_free_displaysurface(vga->ds);
Hans de Goede 56753f
             qemu_create_displaysurface_from(qxl->guest_primary.surface.width,
Hans de Goede 56753f
                                             qxl->guest_primary.surface.height,
Hans de Goede 56753f
@@ -127,8 +124,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
Hans de Goede 56753f
                                             qxl->guest_primary.abs_stride,
Hans de Goede 56753f
                                             qxl->guest_primary.data);
Hans de Goede 56753f
         } else {
Hans de Goede 56753f
-            dprint(qxl, 1, "%s: resizing displaysurface to guest_primary\n",
Hans de Goede 56753f
-                   __func__);
Hans de Goede 56753f
             qemu_resize_displaysurface(vga->ds,
Hans de Goede 56753f
                     qxl->guest_primary.surface.width,
Hans de Goede 56753f
                     qxl->guest_primary.surface.height);
Hans de Goede 56753f
@@ -187,6 +182,7 @@ void qxl_render_update_area_bh(void *opaque)
Hans de Goede 56753f
 void qxl_render_update_area_done(PCIQXLDevice *qxl, QXLCookie *cookie)
Hans de Goede 56753f
 {
Hans de Goede 56753f
     qemu_mutex_lock(&qxl->ssd.lock);
Hans de Goede 56753f
+    trace_qxl_render_update_area_done(cookie);
Hans de Goede 56753f
     qemu_bh_schedule(qxl->update_area_bh);
Hans de Goede 56753f
     qxl->render_update_cookie_num--;
Hans de Goede 56753f
     qemu_mutex_unlock(&qxl->ssd.lock);
Hans de Goede 56753f
diff --git a/trace-events b/trace-events
Hans de Goede 56753f
index 0bc290f..6050d92 100644
Hans de Goede 56753f
--- a/trace-events
Hans de Goede 56753f
+++ b/trace-events
Hans de Goede 56753f
@@ -690,3 +690,10 @@ qxl_spice_reset_memslots(int qid) "%d"
Hans de Goede 56753f
 qxl_spice_update_area(int qid, uint32_t surface_id, uint32_t left, uint32_t right, uint32_t top, uint32_t bottom) "%d sid=%d [%d,%d,%d,%d]"
Hans de Goede 56753f
 qxl_spice_update_area_rest(int qid, uint32_t num_dirty_rects, uint32_t clear_dirty_region) "%d #d=%d clear=%d"
Hans de Goede 56753f
 qxl_surfaces_dirty(int qid, int surface, int offset, int size) "%d surface=%d offset=%d size=%d"
Hans de Goede 56753f
+qxl_vga_ioport_while_not_in_vga_mode(int qid) "%d (int qid, reset to VGA mode because of VGA io)"
Hans de Goede 56753f
+
Hans de Goede 56753f
+# hw/qxl-render.c
Hans de Goede 56753f
+qxl_render_blit_guest_primary_initialized(void) ""
Hans de Goede 56753f
+qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, int32_t bottom) "stride=%d [%d, %d, %d, %d]"
Hans de Goede 56753f
+qxl_render_guest_primary_resized(int32_t width, int32_t height, int32_t stride, int32_t bytes_pp, int32_t bits_pp) "%dx%d, stride %d, bpp %d, depth %d"
Hans de Goede 56753f
+qxl_render_update_area_done(void *cookie) "%p"
Hans de Goede 56753f
-- 
Hans de Goede 56753f
1.7.10
Hans de Goede 56753f