Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf arm-spe: Use ARM_SPE_OP_BRANCH_ERET when synthesizing branches

Instead of checking the type for just branch misses, we can instead
check for the OP_BRANCH_ERET and synthesise branches as well as
branch misses.

Signed-off-by: Graham Woodward <graham.woodward@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Tested-by: Leo Yan <leo.yan@arm.com>
Cc: nd@arm.com
Cc: mike.leach@linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20241025143009.25419-3-graham.woodward@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Graham Woodward and committed by
Namhyung Kim
c1b67c85 19966d79

+6 -6
+6 -6
tools/perf/util/arm-spe.c
··· 68 68 u64 llc_access_id; 69 69 u64 tlb_miss_id; 70 70 u64 tlb_access_id; 71 - u64 branch_miss_id; 71 + u64 branch_id; 72 72 u64 remote_access_id; 73 73 u64 memory_id; 74 74 u64 instructions_id; ··· 672 672 } 673 673 } 674 674 675 - if (spe->sample_branch && (record->type & ARM_SPE_BRANCH_MISS)) { 676 - err = arm_spe__synth_branch_sample(speq, spe->branch_miss_id); 675 + if (spe->sample_branch && (record->op & ARM_SPE_OP_BRANCH_ERET)) { 676 + err = arm_spe__synth_branch_sample(speq, spe->branch_id); 677 677 if (err) 678 678 return err; 679 679 } ··· 1385 1385 if (spe->synth_opts.branches) { 1386 1386 spe->sample_branch = true; 1387 1387 1388 - /* Branch miss */ 1388 + /* Branch */ 1389 1389 err = perf_session__deliver_synth_attr_event(session, &attr, id); 1390 1390 if (err) 1391 1391 return err; 1392 - spe->branch_miss_id = id; 1393 - arm_spe_set_event_name(evlist, id, "branch-miss"); 1392 + spe->branch_id = id; 1393 + arm_spe_set_event_name(evlist, id, "branch"); 1394 1394 id += 1; 1395 1395 } 1396 1396