From: Kan Liang Date: Thu, 2 Feb 2023 19:22:09 +0000 (-0800) Subject: perf test x86: Support the retire_lat (Retire Latency) sample_type check X-Git-Tag: v6.6.7~2868^2~381 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e65f91b20c3d170a1e8b1b6b40cd96bea6343194;p=platform%2Fkernel%2Flinux-starfive.git perf test x86: Support the retire_lat (Retire Latency) sample_type check Add test for the new field for Retire Latency in the X86 specific test. Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230202192209.1795329-3-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c index 690c7c07..a061e86 100644 --- a/tools/perf/arch/x86/tests/sample-parsing.c +++ b/tools/perf/arch/x86/tests/sample-parsing.c @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1, const struct perf_sample *s2, u64 type) { - if (type & PERF_SAMPLE_WEIGHT_STRUCT) + if (type & PERF_SAMPLE_WEIGHT_STRUCT) { COMP(ins_lat); + COMP(retire_lat); + } return true; } @@ -48,6 +50,7 @@ static int do_test(u64 sample_type) struct perf_sample sample = { .weight = 101, .ins_lat = 102, + .retire_lat = 103, }; struct perf_sample sample_out; size_t i, sz, bufsz;