summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJin Yao <yao.jin@linux.intel.com>2019-03-05 08:05:43 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-03-06 16:06:16 -0500
commitc1d3e633e16db3eb64f519c7099171bfcef94b20 (patch)
tree68315dd153428965a90231c70a83cef7e1f0c010 /tools
parentdaca23b2007595b6a48255ca08c763f56050d1c5 (diff)
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: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jiri 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.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Documentation/perf-diff.txt6
-rw-r--r--tools/perf/builtin-diff.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt
index 8c2c229faf50..da7809b15cc9 100644
--- a/tools/perf/Documentation/perf-diff.txt
+++ b/tools/perf/Documentation/perf-diff.txt
@@ -168,6 +168,12 @@ OPTIONS
168 CPUs are specified with -: 0-2. Default is to report samples on all 168 CPUs are specified with -: 0-2. Default is to report samples on all
169 CPUs. 169 CPUs.
170 170
171--pid=::
172 Only diff samples for given process ID (comma separated list).
173
174--tid=::
175 Only diff samples for given thread ID (comma separated list).
176
171COMPARISON 177COMPARISON
172---------- 178----------
173The comparison is governed by the baseline file. The baseline perf.data 179The comparison is governed by the baseline file. The baseline perf.data
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index dfe6c7606f5a..6e7920793729 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -985,6 +985,10 @@ static const struct option options[] = {
985 OPT_STRING(0, "time", &pdiff.time_str, "str", 985 OPT_STRING(0, "time", &pdiff.time_str, "str",
986 "Time span (time percent or absolute timestamp)"), 986 "Time span (time percent or absolute timestamp)"),
987 OPT_STRING(0, "cpu", &cpu_list, "cpu", "list of cpus to profile"), 987 OPT_STRING(0, "cpu", &cpu_list, "cpu", "list of cpus to profile"),
988 OPT_STRING(0, "pid", &symbol_conf.pid_list_str, "pid[,pid...]",
989 "only consider symbols in these pids"),
990 OPT_STRING(0, "tid", &symbol_conf.tid_list_str, "tid[,tid...]",
991 "only consider symbols in these tids"),
988 OPT_END() 992 OPT_END()
989}; 993};
990 994