qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH v4 12/13] meson: move virtio trace events to separate file
Date: Tue,  1 Jun 2021 15:24:13 +0200	[thread overview]
Message-ID: <20210601132414.432430-13-kraxel@redhat.com> (raw)
In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com>

Move virtio-gpu trace events to separate trace-events-virtio file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/trace-virtio.h      |  1 +
 hw/display/virtio-gpu-base.c   |  2 +-
 hw/display/virtio-gpu.c        |  2 +-
 hw/display/meson.build         |  4 ++++
 hw/display/trace-events        | 17 -----------------
 hw/display/trace-events-virtio | 16 ++++++++++++++++
 6 files changed, 23 insertions(+), 19 deletions(-)
 create mode 100644 hw/display/trace-virtio.h
 create mode 100644 hw/display/trace-events-virtio

diff --git a/hw/display/trace-virtio.h b/hw/display/trace-virtio.h
new file mode 100644
index 000000000000..eb0d7dd8fc9f
--- /dev/null
+++ b/hw/display/trace-virtio.h
@@ -0,0 +1 @@
+#include "trace/trace-hw_display_virtio_gpu.h"
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index dd294276cb38..4c654d5af594 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -17,7 +17,7 @@
 #include "migration/blocker.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "trace-virtio.h"
 
 void
 virtio_gpu_base_reset(VirtIOGPUBase *g)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 4d549377cbc1..a7932126e3c7 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -15,7 +15,7 @@
 #include "qemu/units.h"
 #include "qemu/iov.h"
 #include "ui/console.h"
-#include "trace.h"
+#include "trace-virtio.h"
 #include "sysemu/dma.h"
 #include "sysemu/sysemu.h"
 #include "hw/virtio/virtio.h"
diff --git a/hw/display/meson.build b/hw/display/meson.build
index ac98861986d1..645a12a7af99 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -62,6 +62,10 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
                     if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), pixman])
   virtio_gpu_ss.add(when: 'CONFIG_LINUX', if_true: files('virtio-gpu-udmabuf.c'))
   virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
+  trace_events_config += {
+    'file'   : meson.source_root() / 'hw' / 'display' / 'trace-events-virtio',
+    'module' : 'hw-display-virtio-gpu',
+  }
   hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
 
   virtio_gpu_gl_ss = ss.source_set()
diff --git a/hw/display/trace-events b/hw/display/trace-events
index 9c1c972c29c6..27654aee8799 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -22,23 +22,6 @@ vmware_scratch_read(uint32_t index, uint32_t value) "index %d, value 0x%x"
 vmware_scratch_write(uint32_t index, uint32_t value) "index %d, value 0x%x"
 vmware_setmode(uint32_t w, uint32_t h, uint32_t bpp) "%dx%d @ %d bpp"
 
-# virtio-gpu-base.c
-virtio_gpu_features(bool virgl) "virgl %d"
-
-# virtio-gpu.c
-virtio_gpu_cmd_get_display_info(void) ""
-virtio_gpu_cmd_get_edid(uint32_t scanout) "scanout %d"
-virtio_gpu_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d"
-virtio_gpu_cmd_set_scanout_blob(uint32_t id, uint32_t res, uint32_t w, uint32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d"
-virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint32_t h) "res 0x%x, fmt 0x%x, w %d, h %d"
-virtio_gpu_cmd_res_create_blob(uint32_t res, uint64_t size) "res 0x%x, size %" PRId64
-virtio_gpu_cmd_res_unref(uint32_t res) "res 0x%x"
-virtio_gpu_cmd_res_back_attach(uint32_t res) "res 0x%x"
-virtio_gpu_cmd_res_back_detach(uint32_t res) "res 0x%x"
-virtio_gpu_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x"
-virtio_gpu_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t x, uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d"
-virtio_gpu_update_cursor(uint32_t scanout, uint32_t x, uint32_t y, const char *type, uint32_t res) "scanout %d, x %d, y %d, %s, res 0x%x"
-
 # virtio-gpu-virgl.c
 virtio_gpu_gl_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d"
 virtio_gpu_gl_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint32_t h) "res 0x%x, fmt 0x%x, w %d, h %d"
diff --git a/hw/display/trace-events-virtio b/hw/display/trace-events-virtio
new file mode 100644
index 000000000000..52d5c5152f79
--- /dev/null
+++ b/hw/display/trace-events-virtio
@@ -0,0 +1,16 @@
+# virtio-gpu-base.c
+virtio_gpu_features(bool virgl) "virgl %d"
+
+# virtio-gpu.c
+virtio_gpu_cmd_get_display_info(void) ""
+virtio_gpu_cmd_get_edid(uint32_t scanout) "scanout %d"
+virtio_gpu_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d"
+virtio_gpu_cmd_set_scanout_blob(uint32_t id, uint32_t res, uint32_t w, uint32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d"
+virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint32_t h) "res 0x%x, fmt 0x%x, w %d, h %d"
+virtio_gpu_cmd_res_create_blob(uint32_t res, uint64_t size) "res 0x%x, size %" PRId64
+virtio_gpu_cmd_res_unref(uint32_t res) "res 0x%x"
+virtio_gpu_cmd_res_back_attach(uint32_t res) "res 0x%x"
+virtio_gpu_cmd_res_back_detach(uint32_t res) "res 0x%x"
+virtio_gpu_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x"
+virtio_gpu_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t x, uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d"
+virtio_gpu_update_cursor(uint32_t scanout, uint32_t x, uint32_t y, const char *type, uint32_t res) "scanout %d, x %d, y %d, %s, res 0x%x"
-- 
2.31.1



  parent reply	other threads:[~2021-06-01 13:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 13:24 [PATCH v4 00/13] [RfC] fix tracing for modules Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 01/13] qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful Gerd Hoffmann
2021-06-09 12:39   ` Stefan Hajnoczi
2021-06-09 15:21   ` Daniel P. Berrangé
2021-06-01 13:24 ` [PATCH v4 02/13] trace: iter init tweaks Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 03/13] trace: add trace_event_iter_init_group Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 04/13] trace/simple: pass iter to st_write_event_mapping Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 05/13] trace/simple: add st_init_group Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 06/13] meson: add trace_events_config[] Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 07/13] meson: move up hw subdir (specifically before trace subdir) Gerd Hoffmann
2021-06-09 12:42   ` Stefan Hajnoczi
2021-06-01 13:24 ` [PATCH v4 08/13] meson: add module_trace & module_trace_src Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 09/13] trace/stap: build stap files for modules Gerd Hoffmann
2021-06-09 12:48   ` Stefan Hajnoczi
2021-06-01 13:24 ` [PATCH v4 10/13] meson: move qxl trace events to separate file Gerd Hoffmann
2021-06-01 13:24 ` [PATCH v4 11/13] virtio-gpu: split trace points Gerd Hoffmann
2021-06-09 12:49   ` Stefan Hajnoczi
2021-06-01 13:24 ` Gerd Hoffmann [this message]
2021-06-09 15:11   ` [PATCH v4 12/13] meson: move virtio trace events to separate file Stefan Hajnoczi
2021-06-01 13:24 ` [PATCH v4 13/13] meson: move virtio-gl " Gerd Hoffmann
2021-06-09 15:12   ` Stefan Hajnoczi
2021-06-09 15:14 ` [PATCH v4 00/13] [RfC] fix tracing for modules Stefan Hajnoczi
2021-06-10  6:32   ` Gerd Hoffmann
2021-06-10  7:58     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210601132414.432430-13-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).