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

perf branch: Add PERF_BR_NEW_ARCH_[N] map for BRBE on arm64 platform

This updates the perf tool with arch specific branch type classification
used for BRBE on arm64 platform as added in the kernel earlier.

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220824044822.70230-9-anshuman.khandual@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Anshuman Khandual and committed by
Arnaldo Carvalho de Melo
fb42f8b7 bcb96ce6

+19
+6
tools/include/uapi/linux/perf_event.h
··· 282 282 PERF_BR_PRIV_HV = 3, 283 283 }; 284 284 285 + #define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1 286 + #define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2 287 + #define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3 288 + #define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4 289 + #define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5 290 + 285 291 #define PERF_SAMPLE_BRANCH_PLM_ALL \ 286 292 (PERF_SAMPLE_BRANCH_USER|\ 287 293 PERF_SAMPLE_BRANCH_KERNEL|\
+13
tools/perf/util/branch.c
··· 45 45 "FAULT_ALGN", 46 46 "FAULT_DATA", 47 47 "FAULT_INST", 48 + /* 49 + * TODO: This switch should happen on 'session->header.env.arch' 50 + * instead, because an arm64 platform perf recording could be 51 + * opened for analysis on other platforms as well. 52 + */ 53 + #ifdef __aarch64__ 54 + "ARM64_FIQ", 55 + "ARM64_DEBUG_HALT", 56 + "ARM64_DEBUG_EXIT", 57 + "ARM64_DEBUG_INST", 58 + "ARM64_DEBUG_DATA" 59 + #else 48 60 "ARCH_1", 49 61 "ARCH_2", 50 62 "ARCH_3", 51 63 "ARCH_4", 52 64 "ARCH_5" 65 + #endif 53 66 }; 54 67 55 68 if (new_type >= 0 && new_type < PERF_BR_NEW_MAX)