Re: [PATCH v4 0/2] perf, x86: handle overlapping counters

From: Robert Richter
Date: Fri Nov 18 2011 - 11:32:59 EST


On 18.11.11 16:10:17, Peter Zijlstra wrote:
> OK, I've queued these and tested them using something like:

> + EVENT_CONSTRAINT_OVERLAP(0x003c, 0x1|0x2, INTEL_ARCH_EVENT_MASK),
> + EVENT_CONSTRAINT_OVERLAP(0x00c0, 0x2|0x4, INTEL_ARCH_EVENT_MASK),
> + EVENT_CONSTRAINT_OVERLAP(0x4f2e, 0x4|0x8, INTEL_ARCH_EVENT_MASK),
> + EVENT_CONSTRAINT_OVERLAP(0x412e, 0x8|0x1, INTEL_ARCH_EVENT_MASK),
> +
> EVENT_CONSTRAINT_END
> };
>
> To stress the thing, you can quite easily manage to hit that
> WARN_ON_ONCE() in there, but I haven't seen things explode yet.

Yes, the above would require a stack depth of 4 in the worst case
ending up in 2^4 max loops for the above. It would become more with
higher weights.

> > Robert Richter (2):
> > configs: updating misc-x86_64-erda to v3.0.8
> > config: updating misc-x86_64-erda.config for ASUS M4A89GTD PRO
> >
> > configs/misc-x86_64-erda.config | 517 ++++++++++++++++++++++++++++-----------
> > 1 files changed, 379 insertions(+), 138 deletions(-)
>
> You sure about that? :-)

Yeah, wrong terminal... Luckily the patches are correct. ;)

Thanks,

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center

--
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/