Skip to content

Commit b24192a

Browse files
Leo Yanacmel
authored andcommitted
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: 9cb3500 ("perf c2c report: Add hitm/store percent related sort keys") Signed-off-by: Leo Yan <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Joe Mario <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 62e6eb8 commit b24192a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/perf/builtin-c2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,8 +928,8 @@ percent_rmt_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
928928
double per_left;
929929
double per_right;
930930

931-
per_left = PERCENT(left, lcl_hitm);
932-
per_right = PERCENT(right, lcl_hitm);
931+
per_left = PERCENT(left, rmt_hitm);
932+
per_right = PERCENT(right, rmt_hitm);
933933

934934
return per_left - per_right;
935935
}

0 commit comments

Comments
 (0)