lkml.org 
[lkml]   [2020]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-07-17 18:45    [W:0.078 / U:2.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site