From: Peter Zijlstra on
On Tue, 2010-06-29 at 17:37 +0200, Frederic Weisbecker wrote:

> Acked-by: Frederic Weisbecker <fweisbec(a)gmail.com>

I know it breaks at least x86 (although subtle, takes a few perf records
to daze and confuse), arm and sh.

I need to get back to this patch-set and sort that :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Frederic Weisbecker on
On Tue, Jun 29, 2010 at 06:40:01PM +0200, Peter Zijlstra wrote:
> On Tue, 2010-06-29 at 17:37 +0200, Frederic Weisbecker wrote:
>
> > Acked-by: Frederic Weisbecker <fweisbec(a)gmail.com>
>
> I know it breaks at least x86 (although subtle, takes a few perf records
> to daze and confuse), arm and sh.
>
> I need to get back to this patch-set and sort that :-)


Ok :)

But at least the whole idea looks good. Concerning the software parts
I will make a second pass to optimize from my exclusion patchset, but
other than that, it sets a nice background for it.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Frederic Weisbecker on
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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Peter Zijlstra on
On Sat, 2010-07-10 at 15:36 +0200, Frederic Weisbecker wrote:

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

Right.

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

Because I failed to come up with a sensible name, ONCPU doesn't really
make sense either, its got nothing to do with CPUs.

_REALLY_STOPPED maybe, but then, that's a bad name too ;-)


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