2012-10-30 23:01:45 +01:00
|
|
|
[event]
|
|
|
|
fd=1
|
|
|
|
group_fd=-1
|
2014-07-14 08:50:03 +02:00
|
|
|
# 0 or PERF_FLAG_FD_CLOEXEC flag
|
|
|
|
flags=0|8
|
2013-02-25 10:52:50 +01:00
|
|
|
cpu=*
|
2012-10-30 23:01:45 +01:00
|
|
|
type=0|1
|
perf test: Fix wrong size expectation for 'Setup struct perf_event_attr'
The test case "perf test 'Setup struct perf_event_attr'" is failing.
On s390 this output is observed:
# ./perf test -Fvvvv 17
17: Setup struct perf_event_attr :
--- start ---
running './tests/attr/test-stat-C0'
Using CPUID IBM,8561,703,T01,3.6,002f
.....
Event event:base-stat
fd = 1
group_fd = -1
flags = 0|8
cpu = *
type = 0
size = 128 <<<--- wrong, specified in file base-stat
config = 0
sample_period = 0
sample_type = 65536
...
'PERF_TEST_ATTR=/tmp/tmpgw574wvg ./perf stat -o \
/tmp/tmpgw574wvg/perf.data -e cycles -C 0 kill >/dev/null \
2>&1 ret '1', expected '1'
loading result events
Event event-0-0-4
fd = 4
group_fd = -1
cpu = 0
pid = -1
flags = 8
type = 0
size = 136 <<<--- actual size used in system call
.....
compare
matching [event-0-0-4]
to [event:base-stat]
[cpu] 0 *
[flags] 8 0|8
[type] 0 0
[size] 136 128
->FAIL
match: [event-0-0-4] matches []
expected size=136, got 128
FAILED './tests/attr/test-stat-C0' - match failure
This mismatch is caused by
commit 09519ec3b19e ("perf: Add perf_event_attr::config3")
which enlarges the structure perf_event_attr by 8 bytes.
Fix this by adjusting the expected value of size.
Output after:
# ./perf test -Fvvvv 17
17: Setup struct perf_event_attr :
--- start ---
running './tests/attr/test-stat-C0'
Using CPUID IBM,8561,703,T01,3.6,002f
...
matched
compare
matching [event-0-0-4]
to [event:base-stat]
[cpu] 0 *
[flags] 8 0|8
[type] 0 0
[size] 136 136
....
->OK
match: [event-0-0-4] matches ['event:base-stat']
matched
Fixes: 09519ec3b19e4144 ("perf: Add perf_event_attr::config3")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230322094731.1768281-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-03-22 10:47:31 +01:00
|
|
|
size=136
|
2012-10-30 23:01:45 +01:00
|
|
|
config=0
|
2017-07-03 16:50:26 +02:00
|
|
|
sample_period=*
|
2012-10-30 23:01:45 +01:00
|
|
|
sample_type=263
|
2022-10-12 10:46:32 +01:00
|
|
|
read_format=0|4|20
|
2012-10-30 23:01:45 +01:00
|
|
|
disabled=1
|
|
|
|
inherit=1
|
|
|
|
pinned=0
|
|
|
|
exclusive=0
|
|
|
|
exclude_user=0
|
2017-07-03 16:50:21 +02:00
|
|
|
exclude_kernel=0|1
|
2021-05-28 11:10:50 +02:00
|
|
|
exclude_hv=0|1
|
2012-10-30 23:01:45 +01:00
|
|
|
exclude_idle=0
|
|
|
|
mmap=1
|
|
|
|
comm=1
|
|
|
|
freq=1
|
|
|
|
inherit_stat=0
|
|
|
|
enable_on_exec=1
|
2017-07-03 16:50:30 +02:00
|
|
|
task=1
|
2012-11-05 16:49:38 +01:00
|
|
|
watermark=0
|
2017-07-03 16:50:27 +02:00
|
|
|
precise_ip=0|1|2|3
|
2012-10-30 23:01:45 +01:00
|
|
|
mmap_data=0
|
|
|
|
sample_id_all=1
|
2013-05-24 13:16:38 +02:00
|
|
|
exclude_host=0|1
|
|
|
|
exclude_guest=0|1
|
2012-10-30 23:01:45 +01:00
|
|
|
exclude_callchain_kernel=0
|
|
|
|
exclude_callchain_user=0
|
|
|
|
wakeup_events=0
|
|
|
|
bp_type=0
|
|
|
|
config1=0
|
|
|
|
config2=0
|
|
|
|
branch_sample_type=0
|
|
|
|
sample_regs_user=0
|
|
|
|
sample_stack_user=0
|