Re: [PATCH 1/8] ARC: perf: support RAW events
From: Vineet Gupta
Date: Wed Jun 17 2015 - 10:11:31 EST
On Wednesday 17 June 2015 07:03 PM, Peter Zijlstra wrote:
>> But in case of raw events we need to set a counter with index of a
>> > particular event. For example we need to count "myevnt0" events. For
>> > this we need first to find-out what's an index in events list of
>> > "myevnt0" event and then set event counter to count event #x.
>> >
>> > Even though in theory we may set raw even passing an index of desired
>> > event
> That is what I was thinking of, until I read:
>
>> > but given my explanation above each particular CPU may have the
>> > same event with different index in events list.
> ...
>
>> > Fortunately there's already a patch series floating in LKML that
>> > attempts to simplify usage of architecture-specific events, see
>> > http://www.spinics.net/lists/kernel/msg2010232.html
> So you _can_ know a priory in which order the events are for a
> particular CPU ? Say through /proc/cpuinfo.
>
> I would much prefer the raw thing to remain a number; it puts you in
> pretty much the same place as most other archs, including x86.
Sure, but that doesn't mean we start using the index of event as a raw ID. There
are zillion ways to configure cores and the index will certainly start varying.
Which means that user has to determine at run time (using whatever /proc/xxx) what
crun corresponds to. Why inflict such pain on poor guy.
The current raw event, despite representing an ASCII string is still a u64 number.
So it is not more "raw" than what others have. We can get rid of the swapping
business when setting up a raw event, by making sure that cached values from probe
are already in same format.
But using index as a event id is no go sorry...
>
> On x86 we have a huge event list (see the Intel SDM for example) and the
> only way to access those (currently, without the above patch series) is
> to look in the PDF under the right model and enter the numbers by hand.
It is not much different for us !
> The only way in which your hardware appears different is in that it
> seems to include these names in hardware; which to me seems a waste of
> perfectly fine silicon, but hey not my call.
Yeah sins of the past.... :-)
--
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/