Re: [BUG] perf stat: useless output for raw events with new eventparser

From: Peter Zijlstra
Date: Thu Apr 26 2012 - 11:39:47 EST


On Thu, 2012-04-26 at 16:45 +0200, Robert Richter wrote:
> It is totally ok to have parser support for this. I simply do not see
> why we need to put the encoding into sysfs. We somehow know on which
> hardware we run and the parser should already know how to setup the
> syscall. So parsing the above finally ends in calling of something
> like:
>
> setup_event_for_some_pmu(event, 0x4e2, 0xf8);
>
> We don't need any description of bit masks in sysfs for this.

Its the kernel side decoding perf_event_attr, so it seems sensible to
also describe this encoding from the kernel.

Currently we mostly match the hardware encoding, but there's no strict
requirement to do so, we can already see some of that with the extra_reg
stuff, perf_event_attr::config1 can mean different things depending on
the event.

Keeping all this information in two places just seems like asking for it
to get out of sync.

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