Skip to content

Commit

Permalink
perf stat: Convert to Git option parsing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed May 26, 2009
1 parent 8ad8db3 commit 5242519
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 364 deletions.
3 changes: 1 addition & 2 deletions Documentation/perf_counter/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 5242519

Please sign in to comment.