perf: Clean up attr production
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 24 May 2016 16:15:36 +0000 (12:15 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Jun 2016 15:48:37 +0000 (11:48 -0400)
commit0d2bfa4b468e01368da6edcd2734b32ae1946a23
treedbe480948d4c370c0625a519e8fc4cfee43c7a45
parent5e0015bd60a9791f9782b9170f2c4a8ceb079c76
perf: Clean up attr production

We had been using just the raw_info from the kernel to generate the attrs.
That meant that we'd need to keep track of which events we had seen before
(hash table, though since we only ever had one or two events, that might
have been overkill), and we lost information from the original event
selection.

Now we use the perf_eventsel pointer as the raw_info / user_data, and we
can just emit an attr based on what was originally submitted.  That will
also allow us to support some of the generic hardware events in the future.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tools/profile/perf/perf_core.c
tools/profile/perf/perf_core.h
tools/profile/perf/perfconv.c
tools/profile/perf/perfconv.h