@@ -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)
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@gmail.com> --- 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(-)