lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200716153630.GD374956@kernel.org>
Date:   Thu, 16 Jul 2020 12:36:30 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Changbin Du <changbin.du@...il.com>
Cc:     Jiri Olsa <jolsa@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 03/17] perf ftrace: add option -t/--tid to filter by
 thread id

Em Sat, Jul 11, 2020 at 08:40:21PM +0800, Changbin Du escreveu:
> This allows us to trace single thread instead of the whole process.
> 
> Signed-off-by: Changbin Du <changbin.du@...il.com>
> ---
>  tools/perf/Documentation/perf-ftrace.txt | 4 ++++
>  tools/perf/builtin-ftrace.c              | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools/perf/Documentation/perf-ftrace.txt
> index d79560dea19f..e204bf6d50d8 100644
> --- a/tools/perf/Documentation/perf-ftrace.txt
> +++ 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@...e ~]# yes > /dev/null &
[1] 18265
[root@...e ~]# perf ftrace --tid 18265
^C[root@...e ~]#

After waiting for a while, nothing, what am I doing wrong?

- Arnaldo


>  -a::
>  --all-cpus::
>  	Force system-wide collection.  Scripts run without a <command>
> diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
> index 244cc8e6bd60..1188b82c6541 100644
> --- a/tools/perf/builtin-ftrace.c
> +++ b/tools/perf/builtin-ftrace.c
> @@ -515,6 +515,8 @@ int cmd_ftrace(int argc, const char **argv)
>  		    "Show available functions to filter"),
>  	OPT_STRING('p', "pid", &ftrace.target.pid, "pid",
>  		   "trace on existing process id"),
> +	OPT_STRING('t', "tid", &ftrace.target.tid, "tid",
> +		   "trace on existing thread id (exclusive to --pid)"),
>  	OPT_INCR('v', "verbose", &verbose,
>  		 "be more verbose"),
>  	OPT_BOOLEAN('a', "all-cpus", &ftrace.target.system_wide,
> -- 
> 2.25.1
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ