git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'x86-build-for-linus', 'x86-cleanups-for-linus' and 'x86-debug-for...
[sfrench/cifs-2.6.git]
/
tools
/
perf
/
perf.c
diff --git
a/tools/perf/perf.c
b/tools/perf/perf.c
index 95c58fc15284e58ce4e9d744028e52814b9bde3d..2282d41879a2b2ef0c1927f91856c21948e68f30 100644
(file)
--- a/
tools/perf/perf.c
+++ b/
tools/perf/perf.c
@@
-13,11
+13,12
@@
#include "util/quote.h"
#include "util/run-command.h"
#include "util/parse-events.h"
#include "util/quote.h"
#include "util/run-command.h"
#include "util/parse-events.h"
+#include "util/debug.h"
#include <api/fs/debugfs.h>
#include <pthread.h>
const char perf_usage_string[] =
#include <api/fs/debugfs.h>
#include <pthread.h>
const char perf_usage_string[] =
- "perf [--version] [--help] COMMAND [ARGS]";
+ "perf [--version] [--help]
[OPTIONS]
COMMAND [ARGS]";
const char perf_more_info_string[] =
"See 'perf help COMMAND' for more information on a specific command.";
const char perf_more_info_string[] =
"See 'perf help COMMAND' for more information on a specific command.";
@@
-212,6
+213,16
@@
static int handle_options(const char ***argv, int *argc, int *envchanged)
printf("%s ", p->cmd);
}
exit(0);
printf("%s ", p->cmd);
}
exit(0);
+ } else if (!strcmp(cmd, "--debug")) {
+ if (*argc < 2) {
+ fprintf(stderr, "No variable specified for --debug.\n");
+ usage(perf_usage_string);
+ }
+ if (perf_debug_option((*argv)[1]))
+ usage(perf_usage_string);
+
+ (*argv)++;
+ (*argc)--;
} else {
fprintf(stderr, "Unknown option: %s\n", cmd);
usage(perf_usage_string);
} else {
fprintf(stderr, "Unknown option: %s\n", cmd);
usage(perf_usage_string);