perf stat: Convert to Git option parsing
authorIngo Molnar <mingo@elte.hu>
Tue, 26 May 2009 07:17:18 +0000 (09:17 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 26 May 2009 09:59:34 +0000 (11:59 +0200)
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>
Documentation/perf_counter/builtin-record.c
Documentation/perf_counter/builtin-stat.c
Documentation/perf_counter/util/parse-events.c
Documentation/perf_counter/util/parse-events.h

index 6fa6ed6..ec2b787 100644 (file)
@@ -4,7 +4,6 @@
 #include "util/util.h"
 #include "util/parse-options.h"
 #include "util/parse-events.h"
-#include "util/exec_cmd.h"
 
 #include <sched.h>
 
@@ -400,7 +399,7 @@ static const char * const record_usage[] = {
 
 static char events_help_msg[EVENTS_HELP_MAX];
 
-const struct option options[] = {
+static const struct option options[] = {
        OPT_CALLBACK('e', "event", NULL, "event",
                     events_help_msg, parse_events),
        OPT_INTEGER('c', "count", &default_interval,