lkml.org 
[lkml]   [2010]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 13/13] perf: Rework the PMU methods
On Fri, Jul 09, 2010 at 10:21:30AM +0200, Peter Zijlstra wrote:
> -static void x86_pmu_pmu_enable(struct pmu *pmu)
> +static void x86_pmu_enable(struct pmu *pmu)
> {
> struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
> struct perf_event *event;
> @@ -839,7 +839,14 @@ static void x86_pmu_pmu_enable(struct pm
> match_prev_assignment(hwc, cpuc, i))
> continue;
>
> - x86_pmu_stop(event);
> + /*
> + * Ensure we don't accidentally enable a stopped
> + * counter simply because we rescheduled.
> + */
> + if (hwc->state & PERF_HES_STOPPED)
> + hwc->state |= PERF_HES_ARCH;



So, if I understood well, this is to avoid enabling an event from perf_pmu_enable()
while the event was already stopped.

Looks good but why this ARCH name then? This should be a kind of PERF_HES_ONCPU
or so.



\
 
 \ /
  Last update: 2010-07-10 15:39    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site