diff options
author | Changbin Du <changbin.du@gmail.com> | 2020-08-08 05:31:39 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-08-14 15:34:52 +0300 |
commit | 42145d71ddf369a536940a1b0d63b9aef6468516 (patch) | |
tree | 01f75dab965ce98a763a8517db7e1fa3448bf13c /tools/perf/builtin-ftrace.c | |
parent | 6555c2f6db2196ef1b6d7149e7d342d0ba2ec57e (diff) | |
download | linux-42145d71ddf369a536940a1b0d63b9aef6468516.tar.xz |
perf ftrace: Add option --tid to filter by thread id
This allows us to trace single thread instead of the whole process.
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: http://lore.kernel.org/lkml/20200808023141.14227-17-changbin.du@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-ftrace.c')
-rw-r--r-- | tools/perf/builtin-ftrace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 5f9a9ebea0a2..13abb737fd12 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -812,6 +812,9 @@ 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"), + /* TODO: Add short option -t after -t/--tracer can be removed. */ + OPT_STRING(0, "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, |