All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] vga: replace debug printf with trace points
@ 2017-02-08 13:51 Gerd Hoffmann
  2017-02-08 13:51 ` [Qemu-devel] [PATCH 2/2] cirrus: " Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-02-08 13:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/trace-events |  6 ++++++
 hw/display/vga.c        | 27 ++++-----------------------
 2 files changed, 10 insertions(+), 23 deletions(-)

diff --git a/hw/display/trace-events b/hw/display/trace-events
index aadb612..26910e2 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -119,3 +119,9 @@ qxl_set_client_capabilities_unsupported_by_revision(int qid, int revision) "%d r
 qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, int32_t bottom) "stride=%d [%d, %d, %d, %d]"
 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"
 qxl_render_update_area_done(void *cookie) "%p"
+
+# hw/display/vga.c
+vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
+vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
+vga_vbe_read(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
+vga_vbe_write(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 2a88b3c..69c3e1d 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -34,12 +34,9 @@
 #include "hw/xen/xen.h"
 #include "trace.h"
 
-//#define DEBUG_VGA
 //#define DEBUG_VGA_MEM
 //#define DEBUG_VGA_REG
 
-//#define DEBUG_BOCHS_VBE
-
 /* 16 state changes per vertical frame @60 Hz */
 #define VGA_TEXT_CURSOR_PERIOD_MS       (1000 * 2 * 16 / 60)
 
@@ -428,9 +425,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr)
             break;
         }
     }
-#if defined(DEBUG_VGA)
-    printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val);
-#endif
+    trace_vga_std_read_io(addr, val);
     return val;
 }
 
@@ -443,9 +438,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
     if (vga_ioport_invalid(s, addr)) {
         return;
     }
-#ifdef DEBUG_VGA
-    printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val);
-#endif
+    trace_vga_std_write_io(addr, val);
 
     switch(addr) {
     case VGA_ATT_W:
@@ -733,9 +726,7 @@ uint32_t vbe_ioport_read_data(void *opaque, uint32_t addr)
     } else {
         val = 0;
     }
-#ifdef DEBUG_BOCHS_VBE
-    printf("VBE: read index=0x%x val=0x%x\n", s->vbe_index, val);
-#endif
+    trace_vga_vbe_read(s->vbe_index, val);
     return val;
 }
 
@@ -750,9 +741,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
     VGACommonState *s = opaque;
 
     if (s->vbe_index <= VBE_DISPI_INDEX_NB) {
-#ifdef DEBUG_BOCHS_VBE
-        printf("VBE: write index=0x%x val=0x%x\n", s->vbe_index, val);
-#endif
+        trace_vga_vbe_write(s->vbe_index, val);
         switch(s->vbe_index) {
         case VBE_DISPI_INDEX_ID:
             if (val == VBE_DISPI_ID0 ||
@@ -1543,17 +1532,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
                     height, format, s->line_offset,
                     s->vram_ptr + (s->start_addr * 4));
             dpy_gfx_replace_surface(s->con, surface);
-#ifdef DEBUG_VGA
-            printf("VGA: Using shared surface for depth=%d swap=%d\n",
-                   depth, byteswap);
-#endif
         } else {
             qemu_console_resize(s->con, disp_width, height);
             surface = qemu_console_surface(s->con);
-#ifdef DEBUG_VGA
-            printf("VGA: Using shadow surface for depth=%d swap=%d\n",
-                   depth, byteswap);
-#endif
         }
         s->last_scr_width = disp_width;
         s->last_scr_height = height;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 2/2] cirrus: replace debug printf with trace points
  2017-02-08 13:51 [Qemu-devel] [PATCH 1/2] vga: replace debug printf with trace points Gerd Hoffmann
@ 2017-02-08 13:51 ` Gerd Hoffmann
  2017-02-08 15:29   ` Laurent Vivier
  2017-02-08 21:35   ` Philippe Mathieu-Daudé
  2017-02-08 15:28 ` [Qemu-devel] [PATCH 1/2] vga: " Laurent Vivier
  2017-02-08 21:35 ` Philippe Mathieu-Daudé
  2 siblings, 2 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-02-08 13:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/cirrus_vga.c | 11 +++++------
 hw/display/trace-events |  6 ++++++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 16f27e8..b272a70 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -28,6 +28,7 @@
  */
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "trace.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "ui/console.h"
@@ -1852,12 +1853,14 @@ static uint8_t cirrus_mmio_blt_read(CirrusVGAState * s, unsigned address)
 	break;
     }
 
+    trace_vga_cirrus_write_blt(address, value);
     return (uint8_t) value;
 }
 
 static void cirrus_mmio_blt_write(CirrusVGAState * s, unsigned address,
 				  uint8_t value)
 {
+    trace_vga_cirrus_write_blt(address, value);
     switch (address) {
     case (CIRRUS_MMIO_BLTBGCOLOR + 0):
 	cirrus_vga_write_gr(s, 0x00, value);
@@ -2607,9 +2610,7 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
 	    break;
 	}
     }
-#if defined(DEBUG_VGA)
-    printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val);
-#endif
+    trace_vga_cirrus_read_io(addr, val);
     return val;
 }
 
@@ -2626,9 +2627,7 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
     if (vga_ioport_invalid(s, addr)) {
 	return;
     }
-#ifdef DEBUG_VGA
-    printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val);
-#endif
+    trace_vga_cirrus_write_io(addr, val);
 
     switch (addr) {
     case 0x3c0:
diff --git a/hw/display/trace-events b/hw/display/trace-events
index 26910e2..3e896d2 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -125,3 +125,9 @@ vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
 vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
 vga_vbe_read(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
 vga_vbe_write(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
+
+# hw/display/cirrus_vga.c
+vga_cirrus_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
+vga_cirrus_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
+vga_cirrus_read_blt(uint32_t offset, uint32_t val) "offset 0x%x, val 0x%x"
+vga_cirrus_write_blt(uint32_t offset, uint32_t val) "offset 0x%x, val 0x%x"
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] vga: replace debug printf with trace points
  2017-02-08 13:51 [Qemu-devel] [PATCH 1/2] vga: replace debug printf with trace points Gerd Hoffmann
  2017-02-08 13:51 ` [Qemu-devel] [PATCH 2/2] cirrus: " Gerd Hoffmann
@ 2017-02-08 15:28 ` Laurent Vivier
  2017-02-08 21:35 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2017-02-08 15:28 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

On 08/02/2017 14:51, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Laurent Vivier <lvivier@redhat.com>

> ---
>  hw/display/trace-events |  6 ++++++
>  hw/display/vga.c        | 27 ++++-----------------------
>  2 files changed, 10 insertions(+), 23 deletions(-)
> 
> diff --git a/hw/display/trace-events b/hw/display/trace-events
> index aadb612..26910e2 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -119,3 +119,9 @@ qxl_set_client_capabilities_unsupported_by_revision(int qid, int revision) "%d r
>  qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, int32_t bottom) "stride=%d [%d, %d, %d, %d]"
>  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"
>  qxl_render_update_area_done(void *cookie) "%p"
> +
> +# hw/display/vga.c
> +vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_vbe_read(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
> +vga_vbe_write(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 2a88b3c..69c3e1d 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -34,12 +34,9 @@
>  #include "hw/xen/xen.h"
>  #include "trace.h"
>  
> -//#define DEBUG_VGA
>  //#define DEBUG_VGA_MEM
>  //#define DEBUG_VGA_REG
>  
> -//#define DEBUG_BOCHS_VBE
> -
>  /* 16 state changes per vertical frame @60 Hz */
>  #define VGA_TEXT_CURSOR_PERIOD_MS       (1000 * 2 * 16 / 60)
>  
> @@ -428,9 +425,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr)
>              break;
>          }
>      }
> -#if defined(DEBUG_VGA)
> -    printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_std_read_io(addr, val);
>      return val;
>  }
>  
> @@ -443,9 +438,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
>      if (vga_ioport_invalid(s, addr)) {
>          return;
>      }
> -#ifdef DEBUG_VGA
> -    printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_std_write_io(addr, val);
>  
>      switch(addr) {
>      case VGA_ATT_W:
> @@ -733,9 +726,7 @@ uint32_t vbe_ioport_read_data(void *opaque, uint32_t addr)
>      } else {
>          val = 0;
>      }
> -#ifdef DEBUG_BOCHS_VBE
> -    printf("VBE: read index=0x%x val=0x%x\n", s->vbe_index, val);
> -#endif
> +    trace_vga_vbe_read(s->vbe_index, val);
>      return val;
>  }
>  
> @@ -750,9 +741,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
>      VGACommonState *s = opaque;
>  
>      if (s->vbe_index <= VBE_DISPI_INDEX_NB) {
> -#ifdef DEBUG_BOCHS_VBE
> -        printf("VBE: write index=0x%x val=0x%x\n", s->vbe_index, val);
> -#endif
> +        trace_vga_vbe_write(s->vbe_index, val);
>          switch(s->vbe_index) {
>          case VBE_DISPI_INDEX_ID:
>              if (val == VBE_DISPI_ID0 ||
> @@ -1543,17 +1532,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
>                      height, format, s->line_offset,
>                      s->vram_ptr + (s->start_addr * 4));
>              dpy_gfx_replace_surface(s->con, surface);
> -#ifdef DEBUG_VGA
> -            printf("VGA: Using shared surface for depth=%d swap=%d\n",
> -                   depth, byteswap);
> -#endif
>          } else {
>              qemu_console_resize(s->con, disp_width, height);
>              surface = qemu_console_surface(s->con);
> -#ifdef DEBUG_VGA
> -            printf("VGA: Using shadow surface for depth=%d swap=%d\n",
> -                   depth, byteswap);
> -#endif
>          }
>          s->last_scr_width = disp_width;
>          s->last_scr_height = height;
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] cirrus: replace debug printf with trace points
  2017-02-08 13:51 ` [Qemu-devel] [PATCH 2/2] cirrus: " Gerd Hoffmann
@ 2017-02-08 15:29   ` Laurent Vivier
  2017-02-08 21:35   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2017-02-08 15:29 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

On 08/02/2017 14:51, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Laurent Vivier <lvivier@redhat.com>

> ---
>  hw/display/cirrus_vga.c | 11 +++++------
>  hw/display/trace-events |  6 ++++++
>  2 files changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
> index 16f27e8..b272a70 100644
> --- a/hw/display/cirrus_vga.c
> +++ b/hw/display/cirrus_vga.c
> @@ -28,6 +28,7 @@
>   */
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> +#include "trace.h"
>  #include "hw/hw.h"
>  #include "hw/pci/pci.h"
>  #include "ui/console.h"
> @@ -1852,12 +1853,14 @@ static uint8_t cirrus_mmio_blt_read(CirrusVGAState * s, unsigned address)
>  	break;
>      }
>  
> +    trace_vga_cirrus_write_blt(address, value);
>      return (uint8_t) value;
>  }
>  
>  static void cirrus_mmio_blt_write(CirrusVGAState * s, unsigned address,
>  				  uint8_t value)
>  {
> +    trace_vga_cirrus_write_blt(address, value);
>      switch (address) {
>      case (CIRRUS_MMIO_BLTBGCOLOR + 0):
>  	cirrus_vga_write_gr(s, 0x00, value);
> @@ -2607,9 +2610,7 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
>  	    break;
>  	}
>      }
> -#if defined(DEBUG_VGA)
> -    printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_cirrus_read_io(addr, val);
>      return val;
>  }
>  
> @@ -2626,9 +2627,7 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
>      if (vga_ioport_invalid(s, addr)) {
>  	return;
>      }
> -#ifdef DEBUG_VGA
> -    printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_cirrus_write_io(addr, val);
>  
>      switch (addr) {
>      case 0x3c0:
> diff --git a/hw/display/trace-events b/hw/display/trace-events
> index 26910e2..3e896d2 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -125,3 +125,9 @@ vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
>  vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
>  vga_vbe_read(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
>  vga_vbe_write(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
> +
> +# hw/display/cirrus_vga.c
> +vga_cirrus_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_cirrus_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_cirrus_read_blt(uint32_t offset, uint32_t val) "offset 0x%x, val 0x%x"
> +vga_cirrus_write_blt(uint32_t offset, uint32_t val) "offset 0x%x, val 0x%x"
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] vga: replace debug printf with trace points
  2017-02-08 13:51 [Qemu-devel] [PATCH 1/2] vga: replace debug printf with trace points Gerd Hoffmann
  2017-02-08 13:51 ` [Qemu-devel] [PATCH 2/2] cirrus: " Gerd Hoffmann
  2017-02-08 15:28 ` [Qemu-devel] [PATCH 1/2] vga: " Laurent Vivier
@ 2017-02-08 21:35 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-02-08 21:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann



On 02/08/2017 10:51 AM, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>  hw/display/trace-events |  6 ++++++
>  hw/display/vga.c        | 27 ++++-----------------------
>  2 files changed, 10 insertions(+), 23 deletions(-)
>
> diff --git a/hw/display/trace-events b/hw/display/trace-events
> index aadb612..26910e2 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -119,3 +119,9 @@ qxl_set_client_capabilities_unsupported_by_revision(int qid, int revision) "%d r
>  qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, int32_t bottom) "stride=%d [%d, %d, %d, %d]"
>  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"
>  qxl_render_update_area_done(void *cookie) "%p"
> +
> +# hw/display/vga.c
> +vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_vbe_read(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
> +vga_vbe_write(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 2a88b3c..69c3e1d 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -34,12 +34,9 @@
>  #include "hw/xen/xen.h"
>  #include "trace.h"
>
> -//#define DEBUG_VGA
>  //#define DEBUG_VGA_MEM
>  //#define DEBUG_VGA_REG
>
> -//#define DEBUG_BOCHS_VBE
> -
>  /* 16 state changes per vertical frame @60 Hz */
>  #define VGA_TEXT_CURSOR_PERIOD_MS       (1000 * 2 * 16 / 60)
>
> @@ -428,9 +425,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr)
>              break;
>          }
>      }
> -#if defined(DEBUG_VGA)
> -    printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_std_read_io(addr, val);
>      return val;
>  }
>
> @@ -443,9 +438,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
>      if (vga_ioport_invalid(s, addr)) {
>          return;
>      }
> -#ifdef DEBUG_VGA
> -    printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_std_write_io(addr, val);
>
>      switch(addr) {
>      case VGA_ATT_W:
> @@ -733,9 +726,7 @@ uint32_t vbe_ioport_read_data(void *opaque, uint32_t addr)
>      } else {
>          val = 0;
>      }
> -#ifdef DEBUG_BOCHS_VBE
> -    printf("VBE: read index=0x%x val=0x%x\n", s->vbe_index, val);
> -#endif
> +    trace_vga_vbe_read(s->vbe_index, val);
>      return val;
>  }
>
> @@ -750,9 +741,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
>      VGACommonState *s = opaque;
>
>      if (s->vbe_index <= VBE_DISPI_INDEX_NB) {
> -#ifdef DEBUG_BOCHS_VBE
> -        printf("VBE: write index=0x%x val=0x%x\n", s->vbe_index, val);
> -#endif
> +        trace_vga_vbe_write(s->vbe_index, val);
>          switch(s->vbe_index) {
>          case VBE_DISPI_INDEX_ID:
>              if (val == VBE_DISPI_ID0 ||
> @@ -1543,17 +1532,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
>                      height, format, s->line_offset,
>                      s->vram_ptr + (s->start_addr * 4));
>              dpy_gfx_replace_surface(s->con, surface);
> -#ifdef DEBUG_VGA
> -            printf("VGA: Using shared surface for depth=%d swap=%d\n",
> -                   depth, byteswap);
> -#endif
>          } else {
>              qemu_console_resize(s->con, disp_width, height);
>              surface = qemu_console_surface(s->con);
> -#ifdef DEBUG_VGA
> -            printf("VGA: Using shadow surface for depth=%d swap=%d\n",
> -                   depth, byteswap);
> -#endif
>          }
>          s->last_scr_width = disp_width;
>          s->last_scr_height = height;
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] cirrus: replace debug printf with trace points
  2017-02-08 13:51 ` [Qemu-devel] [PATCH 2/2] cirrus: " Gerd Hoffmann
  2017-02-08 15:29   ` Laurent Vivier
@ 2017-02-08 21:35   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-02-08 21:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann



On 02/08/2017 10:51 AM, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>  hw/display/cirrus_vga.c | 11 +++++------
>  hw/display/trace-events |  6 ++++++
>  2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
> index 16f27e8..b272a70 100644
> --- a/hw/display/cirrus_vga.c
> +++ b/hw/display/cirrus_vga.c
> @@ -28,6 +28,7 @@
>   */
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> +#include "trace.h"
>  #include "hw/hw.h"
>  #include "hw/pci/pci.h"
>  #include "ui/console.h"
> @@ -1852,12 +1853,14 @@ static uint8_t cirrus_mmio_blt_read(CirrusVGAState * s, unsigned address)
>  	break;
>      }
>
> +    trace_vga_cirrus_write_blt(address, value);
>      return (uint8_t) value;
>  }
>
>  static void cirrus_mmio_blt_write(CirrusVGAState * s, unsigned address,
>  				  uint8_t value)
>  {
> +    trace_vga_cirrus_write_blt(address, value);
>      switch (address) {
>      case (CIRRUS_MMIO_BLTBGCOLOR + 0):
>  	cirrus_vga_write_gr(s, 0x00, value);
> @@ -2607,9 +2610,7 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
>  	    break;
>  	}
>      }
> -#if defined(DEBUG_VGA)
> -    printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_cirrus_read_io(addr, val);
>      return val;
>  }
>
> @@ -2626,9 +2627,7 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
>      if (vga_ioport_invalid(s, addr)) {
>  	return;
>      }
> -#ifdef DEBUG_VGA
> -    printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val);
> -#endif
> +    trace_vga_cirrus_write_io(addr, val);
>
>      switch (addr) {
>      case 0x3c0:
> diff --git a/hw/display/trace-events b/hw/display/trace-events
> index 26910e2..3e896d2 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -125,3 +125,9 @@ vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
>  vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
>  vga_vbe_read(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
>  vga_vbe_write(uint32_t index, uint32_t val) "index 0x%x, val 0x%x"
> +
> +# hw/display/cirrus_vga.c
> +vga_cirrus_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_cirrus_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x"
> +vga_cirrus_read_blt(uint32_t offset, uint32_t val) "offset 0x%x, val 0x%x"
> +vga_cirrus_write_blt(uint32_t offset, uint32_t val) "offset 0x%x, val 0x%x"
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-08 21:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 13:51 [Qemu-devel] [PATCH 1/2] vga: replace debug printf with trace points Gerd Hoffmann
2017-02-08 13:51 ` [Qemu-devel] [PATCH 2/2] cirrus: " Gerd Hoffmann
2017-02-08 15:29   ` Laurent Vivier
2017-02-08 21:35   ` Philippe Mathieu-Daudé
2017-02-08 15:28 ` [Qemu-devel] [PATCH 1/2] vga: " Laurent Vivier
2017-02-08 21:35 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.