]> git.baikalelectronics.ru Git - kernel.git/commitdiff
perf c2c: Fix sorting in percent_rmt_hitm_cmp()
authorLeo Yan <leo.yan@linaro.org>
Mon, 30 May 2022 08:42:53 +0000 (16:42 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 3 Jun 2022 19:40:15 +0000 (21:40 +0200)
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: 0fa35fad13c5559f ("perf c2c report: Add hitm/store percent related sort keys")
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Joe Mario <jmario@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220530084253.750190-1-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-c2c.c

index 80b525c065edc2070de8bf8b7a86e6e13aec256d..4898ee57d15627b932252680b7219896b2e1f6e2 100644 (file)
@@ -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;
 }