Re: How about limiting refresh ioctl to sampling events ?

From: Francis Moreau
Date: Wed Nov 24 2010 - 05:19:23 EST


Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> writes:

[...]

>> I'm also wondering if you would accept a second patch which will
>> introduce:
>>
>> static inline bool is_sampling_event(struct perf_event *event)
>> {
>> return event->attr.sample_period != 0;
>> }
>>
>> That would make the code slighlty easier to read IMHO.
>>
>
> Sure, Francis might want that too, he found another something like this.

Yes there's another issue when counting events are used: they call
perf_event_output() when 'period_left' gets 0 where as they should not.

--
Francis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/