Received: from eggs.gnu.org ([2001:4830:134:3::10]:51714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpGNe-0005Wj-UY for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:11:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpGNb-0006aw-KW for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:11:46 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39995) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fpGNb-0006aX-Cu for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:11:43 -0400 From: "Emilio G. Cota" Date: Mon, 13 Aug 2018 13:11:31 -0400 Message-Id: <20180813171132.21939-3-cota@braap.org> In-Reply-To: <20180813171132.21939-1-cota@braap.org> References: <20180813171132.21939-1-cota@braap.org> Subject: [Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'info sync' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Crosthwaite , Richard Henderson , "Dr. David Alan Gilbert" , Stefan Weil , Markus Armbruster , Peter Xu Signed-off-by: Emilio G. Cota --- 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 +@item info sync +@findex sync +Show sync profiling info. ETEXI { -- 2.17.1