Signed-off-by: Emilio G. Cota <c...@braap.org> --- 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