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

perf/arm: Drop unused functions

For ARM's implementation, perf_instruction_pointer() and
perf_misc_flags() are equivalent to the generic versions in
include/linux/perf_event.h so arch/arm doesn't need to provide its
own versions. Drop them here.

Signed-off-by: Colton Lewis <coltonlewis@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20241113190156.2145593-2-coltonlewis@google.com

authored by

Colton Lewis and committed by
Ingo Molnar
e33ed362 c554aa9c

-24
-7
arch/arm/include/asm/perf_event.h
··· 8 8 #ifndef __ARM_PERF_EVENT_H__ 9 9 #define __ARM_PERF_EVENT_H__ 10 10 11 - #ifdef CONFIG_PERF_EVENTS 12 - struct pt_regs; 13 - extern unsigned long perf_instruction_pointer(struct pt_regs *regs); 14 - extern unsigned long perf_misc_flags(struct pt_regs *regs); 15 - #define perf_misc_flags(regs) perf_misc_flags(regs) 16 - #endif 17 - 18 11 #define perf_arch_fetch_caller_regs(regs, __ip) { \ 19 12 (regs)->ARM_pc = (__ip); \ 20 13 frame_pointer((regs)) = (unsigned long) __builtin_frame_address(0); \
-17
arch/arm/kernel/perf_callchain.c
··· 96 96 arm_get_current_stackframe(regs, &fr); 97 97 walk_stackframe(&fr, callchain_trace, entry); 98 98 } 99 - 100 - unsigned long perf_instruction_pointer(struct pt_regs *regs) 101 - { 102 - return instruction_pointer(regs); 103 - } 104 - 105 - unsigned long perf_misc_flags(struct pt_regs *regs) 106 - { 107 - int misc = 0; 108 - 109 - if (user_mode(regs)) 110 - misc |= PERF_RECORD_MISC_USER; 111 - else 112 - misc |= PERF_RECORD_MISC_KERNEL; 113 - 114 - return misc; 115 - }