Messages in this thread | | | Date | Fri, 17 Jul 2020 13:44:52 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH v5 03/17] perf ftrace: add option -t/--tid to filter by thread id |
| |
Em Fri, Jul 17, 2020 at 09:26:50PM +0800, Changbin Du escreveu: > On Thu, Jul 16, 2020 at 12:36:30PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Sat, Jul 11, 2020 at 08:40:21PM +0800, Changbin Du escreveu: > > > +++ b/tools/perf/Documentation/perf-ftrace.txt > > > @@ -38,6 +38,10 @@ OPTIONS > > > --pid=:: > > > Trace on existing process id (comma separated list).
> > > +-t:: > > > +--tid=:: > > > + Trace on existing thread id (comma separated list).
> > Humm, I just tried:
> > [root@five ~]# yes > /dev/null & > > [1] 18265 > > [root@five ~]# perf ftrace --tid 18265 > > ^C[root@five ~]#
> > After waiting for a while, nothing, what am I doing wrong?
> I got it wrong. Currently ftrace only can filter by pid. If the pid is not > the main thread it won't work.
> So this patch makes no sense. will drop this.
I think you could alternatively keep it but inform the user that this target, available to other perf commands, isn't available for ftrace as it doesn't support it, this way when the user goes from:
perf trace|top|record|script|report --tid 1234
to:
perf ftrace --tid 1234
He gets a message like:
ERROR: 'ftrace' doesn't support the --tid target, try with --pid
And that would be more useful, provides an explanation as why that target can't be used and suggests an alternative.
- Arnaldo
| |