linux_old1/tools/perf
Andi Kleen 8255718f4b perf pmu: Expand PMU events by prefix match
When the user specifies a pmu directly, expand it automatically with a
prefix match for all available PMUs, similar as we do for the normal
aliases now.

This allows to specify attributes for duplicated boxes quickly.  For
example uncore_cbox_{0,6}/.../ can be now specified as uncore_cbox/.../
and it gets automatically expanded for all boxes.

This generally makes it more concise to write uncore specifications, and
also avoids the need to know the exact topology of the system.

Before:

  % perf stat -a -e uncore_cbox_0/event=0x35,umask=0x1,filter_opc=0x19C/,\
  uncore_cbox_1/event=0x35,umask=0x1,filter_opc=0x19C/,\
  uncore_cbox_2/event=0x35,umask=0x1,filter_opc=0x19C/,\
  uncore_cbox_3/event=0x35,umask=0x1,filter_opc=0x19C/,\
  uncore_cbox_4/event=0x35,umask=0x1,filter_opc=0x19C/,\
  uncore_cbox_5/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1

After:

  % perf stat -a -e uncore_cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1

v2: Handle all bison rules. Move multi add code to separate function.
    Handle uncore_ prefix correctly.
v3: Move parse_events_multi_pmu_add to separate patch. Move uncore
    prefix check to separate patch.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20170320201711.14142-6-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-03-21 16:08:32 -03:00
..
Documentation perf stat: Collapse identically named events 2017-03-21 16:04:11 -03:00
arch perf sdt x86: Add renaming logic for rNN and other registers 2017-03-21 11:07:17 -03:00
bench perf bench numa: Add more comment for -c option 2017-03-06 12:39:30 -03:00
jvmti perf kvmti: Remove unused Makefile file 2016-11-14 12:42:56 -03:00
pmu-events perf vendor events: Add mapping for KnightsMill PMU events 2017-03-03 19:07:13 -03:00
python perf python: Add tracepoint example 2016-07-12 16:23:35 -03:00
scripts perf/core improvements and fixes: 2016-08-04 11:02:38 +02:00
tests perf thread_map: Convert thread_map.refcnt from atomic_t to refcount_t 2017-03-03 19:07:16 -03:00
trace perf trace: Check if MAP_32BIT is defined (again) 2016-12-20 09:37:40 -03:00
ui perf hists browser: Fix typo in function switch_data_file 2017-03-13 11:58:57 -03:00
util perf pmu: Expand PMU events by prefix match 2017-03-21 16:08:32 -03:00
.gitignore perf tools: Ignore generated files pmu-events/{jevents,pmu-events.c} for git 2017-03-13 10:59:36 -03:00
Build perf ftrace: Introduce new 'ftrace' tool 2017-01-26 11:43:01 -03:00
CREDITS
MANIFEST tools include: Adopt kernel's refcount.h 2017-03-03 19:07:14 -03:00
Makefile perf build tests: Do parallell builds with 'build-test' 2016-02-04 15:57:00 -03:00
Makefile.config tools build: Add test for sched_getcpu() 2017-03-03 19:07:19 -03:00
Makefile.perf perf build: Add special fixdep cleaning rule 2017-02-17 16:04:38 -03:00
builtin-annotate.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-bench.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-buildid-cache.c tools: Introduce str_error_r() 2016-07-12 15:19:47 -03:00
builtin-buildid-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-c2c.c perf c2c: Fix display bug when using pipe 2017-03-07 12:48:46 -03:00
builtin-config.c perf config: Mark where are config items from (user or system) 2016-11-14 13:10:37 -03:00
builtin-data.c perf data ctf: Add '--all' option for 'perf data convert' 2016-06-28 10:54:57 -03:00
builtin-diff.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-evlist.c perf evlist: Rename for_each() macros to for_each_entry() 2016-06-23 11:26:15 -03:00
builtin-ftrace.c perf ftrace: Use pager for displaying result 2017-03-03 19:07:17 -03:00
builtin-help.c perf tools: Propagate perf_config() errors 2017-01-27 12:23:33 -03:00
builtin-inject.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-kallsyms.c perf kallsyms: Introduce tool to look for extended symbol information on the running kernel 2017-01-11 16:48:01 -03:00
builtin-kmem.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-kvm.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-list.c perf list: Add debug support for outputing alias string 2017-02-08 08:55:04 -03:00
builtin-lock.c perf lock: Make 'f' part of the common 'lock_options' 2017-03-17 11:49:07 -03:00
builtin-mem.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-probe.c perf probe: Return errno when not hitting any event 2017-03-21 10:45:02 -03:00
builtin-record.c perf record: Synthesize namespace events for current processes 2017-03-14 15:16:09 -03:00
builtin-report.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-sched.c perf sched timehist: Add --next option 2017-03-14 15:17:38 -03:00
builtin-script.c perf script: Add 'brstackinsn' for branch stacks 2017-03-16 09:24:35 -03:00
builtin-stat.c perf stat: Handle partially bad results with merging 2017-03-21 16:07:00 -03:00
builtin-timechart.c perf timechart: Use OPT_PARENT for common options 2017-03-17 11:49:08 -03:00
builtin-top.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
builtin-trace.c perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00
builtin-version.c perf tools: Move cmd_version() to builtin-version.c 2015-12-09 13:42:03 -03:00
builtin.h perf ftrace: Introduce new 'ftrace' tool 2017-01-26 11:43:01 -03:00
check-headers.sh perf tools: Move headers check into bash script 2016-12-15 16:25:44 -03:00
command-list.txt perf tools: Missing c2c command in command-list 2017-03-13 10:59:31 -03:00
design.txt
perf-archive.sh
perf-completion.sh perf tools: Avoid confusion with preloaded bash function for perf bash completion 2015-03-19 13:53:27 -03:00
perf-read-vdso.c
perf-sys.h perf powerpc: Fix build-test failure 2016-09-08 13:44:07 -03:00
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c perf tools: Propagate perf_config() errors 2017-01-27 12:23:33 -03:00
perf.h perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info 2017-03-14 11:38:23 -03:00