Commit c1d3e633 authored by Jin Yao's avatar Jin Yao Committed by Arnaldo Carvalho de Melo

perf diff: Support --pid/--tid filter options

Using the existing symbol_conf.pid_list_str and symbol_conf.tid_list_str
logic.

For example:

  perf diff --tid 13965

It'll only diff the samples for thread 13965.
Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1551791143-10334-4-git-send-email-yao.jin@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent daca23b2
......@@ -168,6 +168,12 @@ OPTIONS
CPUs are specified with -: 0-2. Default is to report samples on all
CPUs.
--pid=::
Only diff samples for given process ID (comma separated list).
--tid=::
Only diff samples for given thread ID (comma separated list).
COMPARISON
----------
The comparison is governed by the baseline file. The baseline perf.data
......
......@@ -985,6 +985,10 @@ static const struct option options[] = {
OPT_STRING(0, "time", &pdiff.time_str, "str",
"Time span (time percent or absolute timestamp)"),
OPT_STRING(0, "cpu", &cpu_list, "cpu", "list of cpus to profile"),
OPT_STRING(0, "pid", &symbol_conf.pid_list_str, "pid[,pid...]",
"only consider symbols in these pids"),
OPT_STRING(0, "tid", &symbol_conf.tid_list_str, "tid[,tid...]",
"only consider symbols in these tids"),
OPT_END()
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment