perf_counter tools: Prepare for 'perf annotate'
Prepare for the 'perf annotate' implementation by splitting off
builtin-annotate.c from builtin-report.c.
( We keep this commit separate to ease the later librarization
of the facilities that perf-report and perf-annotate shares. )
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/Documentation/perf_counter/perf.c b/Documentation/perf_counter/perf.c
index 161824f..4eb7259 100644
--- a/Documentation/perf_counter/perf.c
+++ b/Documentation/perf_counter/perf.c
@@ -263,6 +263,7 @@
{ "report", cmd_report, 0 },
{ "stat", cmd_stat, 0 },
{ "top", cmd_top, 0 },
+ { "annotate", cmd_annotate, 0 },
{ "version", cmd_version, 0 },
};
int i;
@@ -402,9 +403,11 @@
while (1) {
static int done_help = 0;
static int was_alias = 0;
+
was_alias = run_argv(&argc, &argv);
if (errno != ENOENT)
break;
+
if (was_alias) {
fprintf(stderr, "Expansion of alias '%s' failed; "
"'%s' is not a perf-command\n",