diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-26 03:17:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-26 05:59:34 -0400 |
commit | 5242519b0296d128425368fc6ab17f541d5fa775 (patch) | |
tree | 2fb13c01ff80c4ff0818bdcb2d9d9edfbe244036 /Documentation/perf_counter/util/parse-events.h | |
parent | 8ad8db3788fd9a449941fb2392ca85af4ee1cde1 (diff) |
perf stat: Convert to Git option parsing
Remove getopt usage and use Git's much more advanced and more compact
command option library.
Extend the event parser library with the extensions that were in
perf-stat before.
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>
Cc: John Kacur <jkacur@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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/perf_counter/util/parse-events.h b/Documentation/perf_counter/util/parse-events.h index 6e2ebe5ff7d7..0da306bb9028 100644 --- a/Documentation/perf_counter/util/parse-events.h +++ b/Documentation/perf_counter/util/parse-events.h | |||
@@ -1,6 +1,16 @@ | |||
1 | 1 | ||
2 | /* | ||
3 | * Parse symbolic events/counts passed in as options: | ||
4 | */ | ||
5 | |||
2 | extern int nr_counters; | 6 | extern int nr_counters; |
3 | extern __u64 event_id[MAX_COUNTERS]; | 7 | extern __u64 event_id[MAX_COUNTERS]; |
8 | extern int event_mask[MAX_COUNTERS]; | ||
9 | |||
10 | #define EVENT_MASK_KERNEL 1 | ||
11 | #define EVENT_MASK_USER 2 | ||
12 | |||
13 | extern char *event_name(int ctr); | ||
4 | 14 | ||
5 | extern int parse_events(const struct option *opt, const char *str, int unset); | 15 | extern int parse_events(const struct option *opt, const char *str, int unset); |
6 | 16 | ||