[PATCH V1] perf: qcom: Add L3 cache PMU driver
agustinv at codeaurora.org
agustinv at codeaurora.org
Mon Mar 21 09:37:45 PDT 2016
On 2016-03-21 08:04, Peter Zijlstra wrote:
> On Mon, Mar 21, 2016 at 10:35:08AM +0000, Mark Rutland wrote:
>> > +static
>> > +int qcom_l3_cache__event_add(struct perf_event *event, int flags)
>> > +{
>> > + struct l3cache_pmu *system = to_l3cache_pmu(event->pmu);
>> > + struct hw_perf_event *hwc = &event->hw;
>> > + int idx;
>> > + int prev_cpu;
>> > + int err = 0;
>> > +
>> > + /*
>> > + * We need to disable the pmu while adding the event, otherwise
>> > + * the perf tick might kick-in and re-add this event.
>> > + */
>> > + perf_pmu_disable(event->pmu);
>
> Why did you write that? If you really need this you did something
> seriously wrong elsewhere, because:
>
> kernel/events/core.c:event_sched_in() is the only place calling
> pmu::add() and that explicitly already does this.
This might have been before I added the restriction that only one CPU
can open the events, but I will double-check and remove this as it is
unnecessary.
Thanks,
Agustin
More information about the linux-arm-kernel
mailing list