ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
Subsystems (3)
PATCH 1/1 ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
Commit e50c541 (ARM: perf: add guest vs host discrimination) broken the link as perf_instruction_pointer and perf_misc_flags are not defined when CONFIG_HW_PERF_EVENTS is not selected.
As it make little sense to try and profile a guest without any HW event, just fallback to the original code when this config option is not selected.
--- arch/arm/include/asm/perf_event.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/perf_event.h +2 -0
@@ -21,9 +21,11 @@#define C (_x) PERF_COUNT_HW_CACHE_##_x#define CACHE_OP_UNSUPPORTED 0xFFFF +#ifdef CONFIG_HW_PERF_EVENTS struct pt_regs ;extern unsigned long perf_instruction_pointer (struct pt_regs *regs);extern unsigned long perf_misc_flags (struct pt_regs *regs);#define perf_misc_flags (regs) perf_misc_flags(regs) +#endif #endif /* __ARM_PERF_EVENT_H__ */
Signature · 1 line
1.7.12
PATCH 1/1 ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
Quoted 21 lines · Marc Zyngier
Commit e50c541 (ARM: perf: add guest vs host discrimination) broken the link as
perf_instruction_pointerandperf_misc_flagsare not defined whenCONFIG_HW_PERF_EVENTSis not selected.As it make little sense to try and profile a guest without any HW event, just fallback to the original code when this config option is not selected.
Reported-by Russell King <[email protected]>Cc Will Deacon <[email protected]>Signed-off-by Marc Zyngier <[email protected]>--- arch/arm/include/asm/perf_event.h | 2 ++ 1 file changed, 2 insertions(+)arch/arm/include/asm/perf_event.h +0
-0@@ -21,9 +21,11 @@#define C (_x) PERF_COUNT_HW_CACHE_##_x
arch/arm/include/asm/perf_event.h line 31
Quoted 10 lines
arch/arm/include/asm/perf_event.h +2
-0#define CACHE_OP_UNSUPPORTED 0xFFFF +#ifdef CONFIG_HW_PERF_EVENTS struct pt_regs ;extern unsigned long perf_instruction_pointer (struct pt_regs *regs);extern unsigned long perf_misc_flags (struct pt_regs *regs);#define perf_misc_flags (regs) perf_misc_flags(regs) +#endif #endif /* __ARM_PERF_EVENT_H__ */
Thanks Marc for the fix and Russell for reporting the issue.
Please can you stick this in the patch system as I don't have any other perf patches pending for 3.8?
Will
PATCH 1/1 ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
Quoted 35 lines · Will Deacon
Quoted 21 lines · Marc Zyngier
Commit e50c541 (ARM: perf: add guest vs host discrimination) broken the link as
perf_instruction_pointerandperf_misc_flagsare not defined whenCONFIG_HW_PERF_EVENTSis not selected.As it make little sense to try and profile a guest without any HW event, just fallback to the original code when this config option is not selected.
Reported-by Russell King <[email protected]>Cc Will Deacon <[email protected]>Signed-off-by Marc Zyngier <[email protected]>--- arch/arm/include/asm/perf_event.h | 2 ++ 1 file changed, 2 insertions(+)arch/arm/include/asm/perf_event.h +0
-0@@ -21,9 +21,11 @@#define C (_x) PERF_COUNT_HW_CACHE_##_xarch/arm/include/asm/perf_event.h line 31
Quoted 10 lines
arch/arm/include/asm/perf_event.h +2
-0#define CACHE_OP_UNSUPPORTED 0xFFFF +#ifdef CONFIG_HW_PERF_EVENTS struct pt_regs ;extern unsigned long perf_instruction_pointer (struct pt_regs *regs);extern unsigned long perf_misc_flags (struct pt_regs *regs);#define perf_misc_flags (regs) perf_misc_flags(regs) +#endif #endif /* __ARM_PERF_EVENT_H__ */ Acked-by Will Deacon <[email protected]>
Quoted 4 lines
Thanks Marc for the fix and Russell for reporting the issue.
Please can you stick this in the patch system as I don't have any other perf patches pending for 3.8?
Queued as 7584/1.
Cheers,
M.
Signature · 1 line
Jazz is not dead. It just smells funny...