perf diff: Support --cpu filter option
authorJin Yao <yao.jin@linux.intel.com>
Tue, 5 Mar 2019 13:05:42 +0000 (21:05 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Mar 2019 21:05:21 +0000 (18:05 -0300)
commitdaca23b2007595b6a48255ca08c763f56050d1c5
treeae8ef6d1a59f558901c0cba4928f66306e2dce0b
parent4802138d78caed36cee2a859f77fb2035f230018
perf diff: Support --cpu filter option

To improve 'perf diff', implement a --cpu filter option.

Multiple CPUs can be provided as a comma-separated list with no space:
0,1.  Ranges of CPUs are specified with -: 0-2. Default is to report
samples on all CPUs.

For example,

  perf diff --cpu 0,1

It only diff the samples for CPU0 and CPU1.

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-3-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-diff.txt
tools/perf/builtin-diff.c