[PATCH] ARM: oprofile: Always allow backtraces
Will Deacon
will.deacon at arm.com
Thu Jan 20 05:02:30 EST 2011
Hi Robert,
> I would like to go even further, see the diff below.
[...]
> +#else
> +
> +static int oprofile_arch_init(struct oprofile_operations *ops)
> +{
> + pr_info("oprofile: hardware counters not available\n");
> + return -ENODEV;
> +}
> +
> +static void oprofile_arch_exit(void) { }
> +
> +#endif /* CONFIG_HW_PERF_EVENTS */
Don't we now have oprofile_arch_init defined twice in the non-PMU
case? (and one of these definitions is __init)?
> static void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
> {
> struct frame_tail *tail = ((struct frame_tail *) regs->ARM_fp) - 1;
> @@ -111,6 +123,7 @@ static void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
>
> int __init oprofile_arch_init(struct oprofile_operations *ops)
> {
> + /* provide backtrace support also in timer mode: */
> ops->backtrace = arm_backtrace;
Right, so this becomes common code but we need to ensure that we
don't call oprofile_perf_init. I suppose an alternative would be
to provide an empty static inline stub for oprofile_perf_init
instead.
Will
More information about the linux-arm-kernel
mailing list