qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 38/40] vdpa: add trace events for eval_flush


From: Si-Wei Liu
Subject: [PATCH 38/40] vdpa: add trace events for eval_flush
Date: Thu, 7 Dec 2023 09:39:51 -0800

For better debuggability and observability.

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
---
 net/trace-events | 2 ++
 net/vhost-vdpa.c | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/net/trace-events b/net/trace-events
index aab666a..d650c71 100644
--- a/net/trace-events
+++ b/net/trace-events
@@ -26,3 +26,5 @@ colo_filter_rewriter_conn_offset(uint32_t offset) ": 
offset=%u"
 
 # vhost-vdpa.c
 vhost_vdpa_set_address_space_id(void *v, unsigned vq_group, unsigned asid_num) 
"vhost_vdpa: %p vq_group: %u asid: %u"
+vhost_vdpa_net_data_eval_flush(void *s, int qindex, int svq_switch, bool 
svq_flush) "vhost_vdpa: %p qp: %d svq_switch: %d flush_map: %d"
+vhost_vdpa_net_cvq_eval_flush(void *s, int qindex, int svq_switch, bool 
svq_flush) "vhost_vdpa: %p qp: %d svq_switch: %d flush_map: %d"
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 84876b0..a0bd8cd 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -608,6 +608,9 @@ static void vhost_vdpa_net_data_eval_flush(NetClientState 
*nc, bool stop)
                v->desc_group < 0) {
         v->shared->flush_map = true;
     }
+    trace_vhost_vdpa_net_data_eval_flush(v, s->vhost_vdpa.index,
+                                        v->shared->svq_switching,
+                                        v->shared->flush_map);
 }
 
 static NetClientInfo net_vhost_vdpa_info = {
@@ -1457,6 +1460,10 @@ static void vhost_vdpa_net_cvq_eval_flush(NetClientState 
*nc, bool stop)
         !s->cvq_isolated && v->desc_group < 0) {
         v->shared->flush_map = true;
     }
+
+    trace_vhost_vdpa_net_cvq_eval_flush(v, s->vhost_vdpa.index,
+                                       v->shared->svq_switching,
+                                       v->shared->flush_map);
 }
 
 static NetClientInfo net_vhost_vdpa_cvq_info = {
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]