diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-06 03:58:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-06 05:37:22 -0400 |
commit | a21ca2cac582886a3e95c8bb84ff7c52d4d15e54 (patch) | |
tree | d110005d81e46b1afb3204fbaacc132d0ec946ee /Documentation/perf_counter/util/parse-events.h | |
parent | 2f335a02b3c816e77e7df1d15b12e3bbb8f4c8f0 (diff) |
perf_counter: Separate out attr->type from attr->config
Counter type is a frequently used value and we do a lot of
bit juggling by encoding and decoding it from attr->config.
Clean this up by creating a separate attr->type field.
Also clean up the various similarly complex user-space bits
all around counter attribute management.
The net improvement is significant, and it will be easier
to add a new major type (which is what triggered this cleanup).
(This changes the ABI, all tools are adapted.)
(PowerPC build-tested.)
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/util/parse-events.h')
-rw-r--r-- | Documentation/perf_counter/util/parse-events.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Documentation/perf_counter/util/parse-events.h b/Documentation/perf_counter/util/parse-events.h index 0da306bb9028..542971c495bd 100644 --- a/Documentation/perf_counter/util/parse-events.h +++ b/Documentation/perf_counter/util/parse-events.h | |||
@@ -3,12 +3,9 @@ | |||
3 | * Parse symbolic events/counts passed in as options: | 3 | * Parse symbolic events/counts passed in as options: |
4 | */ | 4 | */ |
5 | 5 | ||
6 | extern int nr_counters; | 6 | extern int nr_counters; |
7 | extern __u64 event_id[MAX_COUNTERS]; | ||
8 | extern int event_mask[MAX_COUNTERS]; | ||
9 | 7 | ||
10 | #define EVENT_MASK_KERNEL 1 | 8 | extern struct perf_counter_attr attrs[MAX_COUNTERS]; |
11 | #define EVENT_MASK_USER 2 | ||
12 | 9 | ||
13 | extern char *event_name(int ctr); | 10 | extern char *event_name(int ctr); |
14 | 11 | ||