perf c2c: Add helpers to get counts of loads or stores
authorShang XiaoJing <shangxiaojing@huawei.com>
Tue, 6 Sep 2022 03:29:05 +0000 (11:29 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Oct 2022 11:55:21 +0000 (08:55 -0300)
commitcf874a0165e4a6ea906db9e735d52ee50fdf760b
treea2addbd4d9a306a8c3b081e36378c7e061922daa
parent4fb47c8c20ec851128a36f82295886d325920864
perf c2c: Add helpers to get counts of loads or stores

Wrap repeated code in helper functions get_load_llc_misses,
get_load_cache_hits. For consistence, helper function get_stores is
wraped as well.

Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220906032906.21395-3-shangxiaojing@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-c2c.c