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

William Cohen wcohen at redhat.com
Mon Mar 5 01:20:04 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,

After getting the perf support working on the trimslice machine with the 3.3.0-rc5+ kernel I tried the patch today with the attached fixup for kzalloc on an arm machine. Also made sure that the following options were set:

CONFIG_CPUMASK_OFFSTACK=y
CONFIG_DEBUG_PER_CPU_MAPS=y

Your patch compiles and seems to work. I exercised oprofile a bit on the arm machine with the simple exercise.sh script.   I didn't see complaints on the /var/log/messages.

-Will


More information about the arm mailing list