Re: [PATCH] oprofile: check whether oprofile perf enabled in op_overflow_handler()

Weng Meiling
2014-01-17T03:38:28Z

On 2014/1/17 3:36, Will Deacon wrote:
> On Thu, Jan 16, 2014 at 11:52:45AM +0000, Robert Richter wrote:
>> (cc'ing Will)
>
> Thanks Robert,
>
>> The problem of too low sample periods could be solved on ARM by using
>> perf's interrupt throttling, you might play around with:
>>
>> /proc/sys/kernel/perf_event_max_sample_rate:100000
>>
>> I am not quite sure whether this works esp. for kernel counters and

Try to lower the value of perf_event_max_sample_rate, it works. Testing
the following values:
100 500 1000 5000 10000 50000

for the last value, the command start to stall.
Just a simple test. :)

>> how userland can be notified about throttling. Throttling could be
>> worth for operf too, not only for the oprofile kernel driver.
>>

>> From a quick look it seems there is also code in x86 that dynamically
>> adjusts the rate which might be worth being implemented for ARM too.
>
> Are you referring to the perf_sample_event_took callback? If so, that
> certainly looks worth persuing. I'll stick it on my list, thanks!
>

Thanks Will for doing this.

Thanks
Weng Meiling

> Will
>
> .
>