Re: [PATCH 2/5] perf, x86: Enable PDIR precise instruction profilingon IvyBridge
From: Stephane Eranian
Date: Thu Jul 05 2012 - 21:04:26 EST
On Thu, Jul 5, 2012 at 7:26 PM, Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
> On Thu, Jul 05, 2012 at 05:45:16PM +0200, Stephane Eranian wrote:
>> On Tue, Jul 3, 2012 at 6:04 AM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
>> >> Well, the only way I can think of would be to request that the
>> >> event be programmed with exclusive mode ALWAYS. That
>> >> should not be to hard to add.
>> > I suspect it would need some special callbacks from the events core,
>> > that's why I only tried on IvyBridge.
>> You could simply add a check in the x86 init code like what is done
>> with the pebs events and precise mode.
> Ah requiring the user to set exclusive? Maybe. Right now perf does not even
> have an option to set it. Would seem user unfriendly to me though.
Yes, that's what I meant since the beginning. Require exclusive mode
on the event is all we need to enforce the restriction. The scheduling
would still only work on counter 1.
I know that perf record/stat do not support this but given the new event
parser it should not too hard to add an excl term to the syntax. I have
that in libpfm4 now as an option on events. That's clearly a perf_event
option like period or freq and not a HW option like inv, edge.
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/