* [PATCH] ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
@ 2012-11-22 11:47 Marc Zyngier
2012-11-22 11:58 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2012-11-22 11:47 UTC (permalink / raw)
To: linux-arm-kernel
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.
Reported-by: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/include/asm/perf_event.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h
index 00416ed..7558775 100644
--- a/arch/arm/include/asm/perf_event.h
+++ b/arch/arm/include/asm/perf_event.h
@@ -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__ */
--
1.7.12
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
2012-11-22 11:47 [PATCH] ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected Marc Zyngier
@ 2012-11-22 11:58 ` Will Deacon
2012-11-22 12:08 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2012-11-22 11:58 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Nov 22, 2012 at 11:47:31AM +0000, Marc Zyngier wrote:
> 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.
>
> Reported-by: Russell King <linux@arm.linux.org.uk>
> Cc: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> arch/arm/include/asm/perf_event.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h
> index 00416ed..7558775 100644
> --- a/arch/arm/include/asm/perf_event.h
> +++ b/arch/arm/include/asm/perf_event.h
> @@ -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__ */
> --
Acked-by: Will Deacon <will.deacon@arm.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
2012-11-22 11:58 ` Will Deacon
@ 2012-11-22 12:08 ` Marc Zyngier
0 siblings, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2012-11-22 12:08 UTC (permalink / raw)
To: linux-arm-kernel
On 22/11/12 11:58, Will Deacon wrote:
> On Thu, Nov 22, 2012 at 11:47:31AM +0000, Marc Zyngier wrote:
>> 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.
>>
>> Reported-by: Russell King <linux@arm.linux.org.uk>
>> Cc: Will Deacon <will.deacon@arm.com>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> ---
>> arch/arm/include/asm/perf_event.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h
>> index 00416ed..7558775 100644
>> --- a/arch/arm/include/asm/perf_event.h
>> +++ b/arch/arm/include/asm/perf_event.h
>> @@ -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__ */
>> --
>
> Acked-by: Will Deacon <will.deacon@arm.com>
>
> 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.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-22 12:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 11:47 [PATCH] ARM: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected Marc Zyngier
2012-11-22 11:58 ` Will Deacon
2012-11-22 12:08 ` Marc Zyngier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.