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

William Cohen wcohen at redhat.com
Fri Mar 2 18:11:28 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,

I was also able to build a kernel with the patch/option and run it. I did make sure I had the options set that previously caused problems, CONFIG_CPUMASK_OFFSTACK and DEBUG_PER_CPU_MAPS.

However, I don't think I am actually exercising the modified code because of: 

Bug 741325 - ARM fc14 kernels does not provide hardware perf counter support

-Will

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config-20120303
URL: <http://lists.fedoraproject.org/pipermail/arm/attachments/20120302/c1512aea/attachment-0001.ksh>


More information about the arm mailing list