[fedora-arm] [PATCH] oprofile, perf: Use per-cpu framework

William Cohen wcohen at redhat.com
Fri Mar 2 21:44:14 UTC 2012


On 03/02/2012 06:31 AM, Robert Richter wrote:
> On 23.02.12 17:25:11, Robert Richter wrote:
>> On 23.02.12 10:12:35, Will Deacon wrote:
>>> On Thu, Feb 23, 2012 at 04:08:23AM +0000, William Cohen wrote:
>>>> I was looking to see why the arm kernel builds for fedora 17 were failing with:
>>>>
>>>> arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:28:28: error: variably modified 'perf_events' at file scope
>>>>
>>>> The error points to the following line in oprofile_perf.c:
>>>>  
>>>> static struct perf_event **perf_events[nr_cpumask_bits];
>>
>>> That or use NR_CPUS instead (which will be the same as nr_cpu_ids on ARM).
>>
>> William,
>>
>> the patch below uses per-cpu macros and should probably fix the
>> above. But it's *compile tested only*.
> 
> William,
> 
> could you give this patch a try? I would like to remove the cpu array
> implementation and change the code to use the cpu framework.
> 
> Please, send me also your config for further testing.
> 
> Many thanks,
> 
> -Robert

Hi Robert, 

The patch isn't going to work in its current state.   kcalloc to kzalloc and have different number of arguments.

static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
static inline void *kzalloc(size_t size, gfp_t flags)

I think I have an idea why the performance monitoring isn't working on the tegra based trimslice I have. It looks like the pmu hardware is never registered.

https://bugzilla.redhat.com/show_bug.cgi?id=741325#c23

I am trying to get a kernel that has working pmu support then try testing the suggested patch.

-Will


More information about the arm mailing list