Commit 692f5a22 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf tests attr: Make hw events optional

Otherwise we fail on virtual machines with no support for specific HW
events.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171009130712.14747-1-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 73c17d81
...@@ -7,3 +7,4 @@ ret = 1 ...@@ -7,3 +7,4 @@ ret = 1
# events are disabled by default when attached to cpu # events are disabled by default when attached to cpu
disabled=1 disabled=1
enable_on_exec=0 enable_on_exec=0
optional=1
...@@ -4,3 +4,4 @@ args = -e cycles kill >/dev/null 2>&1 ...@@ -4,3 +4,4 @@ args = -e cycles kill >/dev/null 2>&1
ret = 1 ret = 1
[event:base-stat] [event:base-stat]
optional=1
...@@ -32,6 +32,7 @@ config=2 ...@@ -32,6 +32,7 @@ config=2
fd=5 fd=5
type=0 type=0
config=0 config=0
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND # PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
[event6:base-stat] [event6:base-stat]
...@@ -52,15 +53,18 @@ optional=1 ...@@ -52,15 +53,18 @@ optional=1
fd=8 fd=8
type=0 type=0
config=1 config=1
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
[event9:base-stat] [event9:base-stat]
fd=9 fd=9
type=0 type=0
config=4 config=4
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
[event10:base-stat] [event10:base-stat]
fd=10 fd=10
type=0 type=0
config=5 config=5
optional=1
...@@ -33,6 +33,7 @@ config=2 ...@@ -33,6 +33,7 @@ config=2
fd=5 fd=5
type=0 type=0
config=0 config=0
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND # PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
[event6:base-stat] [event6:base-stat]
...@@ -53,18 +54,21 @@ optional=1 ...@@ -53,18 +54,21 @@ optional=1
fd=8 fd=8
type=0 type=0
config=1 config=1
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
[event9:base-stat] [event9:base-stat]
fd=9 fd=9
type=0 type=0
config=4 config=4
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
[event10:base-stat] [event10:base-stat]
fd=10 fd=10
type=0 type=0
config=5 config=5
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_L1D << 0 | # PERF_COUNT_HW_CACHE_L1D << 0 |
...@@ -74,6 +78,7 @@ config=5 ...@@ -74,6 +78,7 @@ config=5
fd=11 fd=11
type=3 type=3
config=0 config=0
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_L1D << 0 | # PERF_COUNT_HW_CACHE_L1D << 0 |
...@@ -83,6 +88,7 @@ config=0 ...@@ -83,6 +88,7 @@ config=0
fd=12 fd=12
type=3 type=3
config=65536 config=65536
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_LL << 0 | # PERF_COUNT_HW_CACHE_LL << 0 |
...@@ -92,6 +98,7 @@ config=65536 ...@@ -92,6 +98,7 @@ config=65536
fd=13 fd=13
type=3 type=3
config=2 config=2
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_LL << 0 | # PERF_COUNT_HW_CACHE_LL << 0 |
...@@ -101,3 +108,4 @@ config=2 ...@@ -101,3 +108,4 @@ config=2
fd=14 fd=14
type=3 type=3
config=65538 config=65538
optional=1
...@@ -33,6 +33,7 @@ config=2 ...@@ -33,6 +33,7 @@ config=2
fd=5 fd=5
type=0 type=0
config=0 config=0
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND # PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
[event6:base-stat] [event6:base-stat]
...@@ -53,18 +54,21 @@ optional=1 ...@@ -53,18 +54,21 @@ optional=1
fd=8 fd=8
type=0 type=0
config=1 config=1
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
[event9:base-stat] [event9:base-stat]
fd=9 fd=9
type=0 type=0
config=4 config=4
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
[event10:base-stat] [event10:base-stat]
fd=10 fd=10
type=0 type=0
config=5 config=5
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_L1D << 0 | # PERF_COUNT_HW_CACHE_L1D << 0 |
...@@ -74,6 +78,7 @@ config=5 ...@@ -74,6 +78,7 @@ config=5
fd=11 fd=11
type=3 type=3
config=0 config=0
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_L1D << 0 | # PERF_COUNT_HW_CACHE_L1D << 0 |
...@@ -83,6 +88,7 @@ config=0 ...@@ -83,6 +88,7 @@ config=0
fd=12 fd=12
type=3 type=3
config=65536 config=65536
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_LL << 0 | # PERF_COUNT_HW_CACHE_LL << 0 |
...@@ -92,6 +98,7 @@ config=65536 ...@@ -92,6 +98,7 @@ config=65536
fd=13 fd=13
type=3 type=3
config=2 config=2
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_LL << 0 | # PERF_COUNT_HW_CACHE_LL << 0 |
...@@ -101,6 +108,7 @@ config=2 ...@@ -101,6 +108,7 @@ config=2
fd=14 fd=14
type=3 type=3
config=65538 config=65538
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_L1I << 0 | # PERF_COUNT_HW_CACHE_L1I << 0 |
...@@ -120,6 +128,7 @@ optional=1 ...@@ -120,6 +128,7 @@ optional=1
fd=16 fd=16
type=3 type=3
config=65537 config=65537
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_DTLB << 0 | # PERF_COUNT_HW_CACHE_DTLB << 0 |
...@@ -129,6 +138,7 @@ config=65537 ...@@ -129,6 +138,7 @@ config=65537
fd=17 fd=17
type=3 type=3
config=3 config=3
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_DTLB << 0 | # PERF_COUNT_HW_CACHE_DTLB << 0 |
...@@ -138,6 +148,7 @@ config=3 ...@@ -138,6 +148,7 @@ config=3
fd=18 fd=18
type=3 type=3
config=65539 config=65539
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_ITLB << 0 | # PERF_COUNT_HW_CACHE_ITLB << 0 |
...@@ -147,6 +158,7 @@ config=65539 ...@@ -147,6 +158,7 @@ config=65539
fd=19 fd=19
type=3 type=3
config=4 config=4
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_ITLB << 0 | # PERF_COUNT_HW_CACHE_ITLB << 0 |
...@@ -156,3 +168,4 @@ config=4 ...@@ -156,3 +168,4 @@ config=4
fd=20 fd=20
type=3 type=3
config=65540 config=65540
optional=1
...@@ -33,6 +33,7 @@ config=2 ...@@ -33,6 +33,7 @@ config=2
fd=5 fd=5
type=0 type=0
config=0 config=0
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND # PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
[event6:base-stat] [event6:base-stat]
...@@ -53,18 +54,21 @@ optional=1 ...@@ -53,18 +54,21 @@ optional=1
fd=8 fd=8
type=0 type=0
config=1 config=1
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
[event9:base-stat] [event9:base-stat]
fd=9 fd=9
type=0 type=0
config=4 config=4
optional=1
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES # PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
[event10:base-stat] [event10:base-stat]
fd=10 fd=10
type=0 type=0
config=5 config=5
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_L1D << 0 | # PERF_COUNT_HW_CACHE_L1D << 0 |
...@@ -74,6 +78,7 @@ config=5 ...@@ -74,6 +78,7 @@ config=5
fd=11 fd=11
type=3 type=3
config=0 config=0
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_L1D << 0 | # PERF_COUNT_HW_CACHE_L1D << 0 |
...@@ -83,6 +88,7 @@ config=0 ...@@ -83,6 +88,7 @@ config=0
fd=12 fd=12
type=3 type=3
config=65536 config=65536
optional=1
# PERF_TYPE_HW_CACHE / # PERF_TYPE_HW_CACHE /
# PERF_COUNT_HW_CACHE_LL << 0 | # PERF_COUNT_HW_CACHE_LL << 0 |
...@@ -92,6 +98,7 @@ config=65536 ...@@ -92,6 +98,7 @@ config=65536
fd=13 fd=13
type=3 type=3
config=2 config=2
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_LL << 0 | # PERF_COUNT_HW_CACHE_LL << 0 |
...@@ -101,6 +108,7 @@ config=2 ...@@ -101,6 +108,7 @@ config=2
fd=14 fd=14
type=3 type=3
config=65538 config=65538
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_L1I << 0 | # PERF_COUNT_HW_CACHE_L1I << 0 |
...@@ -120,6 +128,7 @@ optional=1 ...@@ -120,6 +128,7 @@ optional=1
fd=16 fd=16
type=3 type=3
config=65537 config=65537
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_DTLB << 0 | # PERF_COUNT_HW_CACHE_DTLB << 0 |
...@@ -129,6 +138,7 @@ config=65537 ...@@ -129,6 +138,7 @@ config=65537
fd=17 fd=17
type=3 type=3
config=3 config=3
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_DTLB << 0 | # PERF_COUNT_HW_CACHE_DTLB << 0 |
...@@ -138,6 +148,7 @@ config=3 ...@@ -138,6 +148,7 @@ config=3
fd=18 fd=18
type=3 type=3
config=65539 config=65539
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_ITLB << 0 | # PERF_COUNT_HW_CACHE_ITLB << 0 |
...@@ -147,6 +158,7 @@ config=65539 ...@@ -147,6 +158,7 @@ config=65539
fd=19 fd=19
type=3 type=3
config=4 config=4
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_ITLB << 0 | # PERF_COUNT_HW_CACHE_ITLB << 0 |
...@@ -156,6 +168,7 @@ config=4 ...@@ -156,6 +168,7 @@ config=4
fd=20 fd=20
type=3 type=3
config=65540 config=65540
optional=1
# PERF_TYPE_HW_CACHE, # PERF_TYPE_HW_CACHE,
# PERF_COUNT_HW_CACHE_L1D << 0 | # PERF_COUNT_HW_CACHE_L1D << 0 |
......
...@@ -5,3 +5,4 @@ ret = 1 ...@@ -5,3 +5,4 @@ ret = 1
[event:base-stat] [event:base-stat]
inherit=0 inherit=0
optional=1
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