qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'info sy


From: Emilio G. Cota
Subject: [Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'info sync'
Date: Mon, 13 Aug 2018 13:11:31 -0400

Signed-off-by: Emilio G. Cota <address@hidden>
---
 monitor.c            |  7 +++++++
 hmp-commands-info.hx | 16 ++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/monitor.c b/monitor.c
index 77861e96af..66d8d85b97 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1454,6 +1454,13 @@ static void hmp_info_opcount(Monitor *mon, const QDict 
*qdict)
 }
 #endif
 
+static void hmp_info_sync(Monitor *mon, const QDict *qdict)
+{
+    int64_t max = qdict_get_try_int(qdict, "max", 10);
+
+    qsp_report((FILE *)mon, monitor_fprintf, max);
+}
+
 static void hmp_info_history(Monitor *mon, const QDict *qdict)
 {
     int i;
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
index 70639f656a..56a3249bad 100644
--- a/hmp-commands-info.hx
+++ b/hmp-commands-info.hx
@@ -297,6 +297,22 @@ STEXI
 @item info opcount
 @findex info opcount
 Show dynamic compiler opcode counters
+ETEXI
+
+    {
+        .name       = "sync",
+        .args_type  = "max:i?",
+        .params     = "[max]",
+        .help       = "show sync profiling info for "
+                     "up to max entries (default: 10). "
+                     "Entries are sorted by wait time.",
+        .cmd        = hmp_info_sync,
+    },
+
+STEXI
address@hidden info sync
address@hidden sync
+Show sync profiling info.
 ETEXI
 
     {
-- 
2.17.1




reply via email to

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