Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf test: Fix sample-parsing failure on non-x86 platforms

Executing 'perf test 27' fails on s390:

[root@t35lp46 perf]# ./perf test -Fv 27
27: Sample parsing
--- start ---
---- end ----
Sample parsing: FAILED!
[root@t35lp46 perf]#

The commit fbefe9c2f87fd392 ("perf tools: Support arch specific
PERF_SAMPLE_WEIGHT_STRUCT processing") changes the ins_lat to a
model-specific variable only for X86, but perf test still verify the
variable in the generic test.

Remove the ins_lat check in the generic test. The following patch will
add it in the X86 specific test.

Fixes: fbefe9c2f87fd392 ("perf tools: Support arch specific PERF_SAMPLE_WEIGHT_STRUCT processing")
Reported-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: http://lore.kernel.org/lkml/1614787285-104151-1-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Kan Liang and committed by
Arnaldo Carvalho de Melo
a8146d66 ec4d0a76

-4
-4
tools/perf/tests/sample-parsing.c
··· 129 129 if (type & PERF_SAMPLE_WEIGHT) 130 130 COMP(weight); 131 131 132 - if (type & PERF_SAMPLE_WEIGHT_STRUCT) 133 - COMP(ins_lat); 134 - 135 132 if (type & PERF_SAMPLE_DATA_SRC) 136 133 COMP(data_src); 137 134 ··· 242 245 .cgroup = 114, 243 246 .data_page_size = 115, 244 247 .code_page_size = 116, 245 - .ins_lat = 117, 246 248 .aux_sample = { 247 249 .size = sizeof(aux_data), 248 250 .data = (void *)aux_data,