From c1d3e633e16db3eb64f519c7099171bfcef94b20 Mon Sep 17 00:00:00 2001 From: Jin Yao Date: Tue, 5 Mar 2019 21:05:43 +0800 Subject: 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 Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1551791143-10334-4-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-diff.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/perf/builtin-diff.c') 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[] = { 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() }; -- cgit v1.2.3