On Mon, 4 May 2020 09:27:09 +0300 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > By default, "trace-cmd stat" command prints status of the main ftrace instance. When more > instances are configured, the user could be confused which status is displayed. Hmm, I'm not so big on this one. Has anyone complained about it? We never actually gave a name to the top level. In fact, it can get more confusing if someone were to create an instance called "main" then it would get even more confusing. I think the better answer is to just move the instance reporting to the end, and not at the beginning. That would make more sense. I was thinking of recommending that when I first applied the patch, but now I think it should be done. -- Steve > > Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> > --- > tracecmd/trace-stat.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tracecmd/trace-stat.c b/tracecmd/trace-stat.c > index c5057978..dcf2789c 100644 > --- a/tracecmd/trace-stat.c > +++ b/tracecmd/trace-stat.c > @@ -920,8 +920,10 @@ static void stat_instance(struct buffer_instance *instance) > printf("---------------\n"); > printf("Instance: %s\n", > tracefs_instance_get_name(instance->tracefs)); > - } else > + } else { > report_instances(); > + printf("\nInstance: main\n\n"); > + } > > report_plugin(instance); > report_events(instance);