From: Leo Yan Date: Mon, 30 May 2022 08:42:53 +0000 (+0800) Subject: perf c2c: Fix sorting in percent_rmt_hitm_cmp() X-Git-Tag: baikal/mips/sdk6.1~5564^2~2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=0a6c28de8b0ba24bd109f2683604c2a6f50b61c5;p=kernel.git perf c2c: Fix sorting in percent_rmt_hitm_cmp() The function percent_rmt_hitm_cmp() wrongly uses local HITMs for sorting remote HITMs. Since this function is to sort cache lines for remote HITMs, this patch changes to use 'rmt_hitm' field for correct sorting. Fixes: 6acd8fb40c1aecc3 ("perf c2c report: Add hitm/store percent related sort keys") Signed-off-by: Leo Yan Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Joe Mario Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220530084253.750190-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 80b525c065edc..4898ee57d1562 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -928,8 +928,8 @@ percent_rmt_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_unused, double per_left; double per_right; - per_left = PERCENT(left, lcl_hitm); - per_right = PERCENT(right, lcl_hitm); + per_left = PERCENT(left, rmt_hitm); + per_right = PERCENT(right, rmt_hitm); return per_left - per_right; }