By default, "trace-cmd stat" command prints status of the main ftrace instance. At top of the output there is a listing of all configured instances abd the user could be confused which status is displayed. Moved this list at the end of the command output. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> --- v3: Removed the "main" when top instance is displayed and move instance listing at the end of command's output. tracecmd/trace-stat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tracecmd/trace-stat.c b/tracecmd/trace-stat.c index c5057978..bd0e647a 100644 --- a/tracecmd/trace-stat.c +++ b/tracecmd/trace-stat.c @@ -920,8 +920,7 @@ static void stat_instance(struct buffer_instance *instance) printf("---------------\n"); printf("Instance: %s\n", tracefs_instance_get_name(instance->tracefs)); - } else - report_instances(); + } report_plugin(instance); report_events(instance); @@ -937,6 +936,8 @@ static void stat_instance(struct buffer_instance *instance) report_uprobes(instance); report_traceon(instance); report_errorlog(instance); + if (instance == &top_instance) + report_instances(); } void trace_stat (int argc, char **argv) -- 2.26.2