diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-12-14 17:09:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-15 02:50:28 -0500 |
commit | c8829c7a31c7e0156b230fa8d5a14be9881d7677 (patch) | |
tree | c8649f461c5192613de3fe47b728e47a8b5c9e2c /tools/perf/builtin-annotate.c | |
parent | f823e441ab4dfaeaf17832fa1931e0dc0fde304d (diff) |
perf util: Remove setup_sorting dups
And it is also needed by 'perf diff'.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260828571-3613-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index fa833f50763e..2e2855a685c6 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -521,21 +521,6 @@ static const struct option options[] = { | |||
521 | OPT_END() | 521 | OPT_END() |
522 | }; | 522 | }; |
523 | 523 | ||
524 | static void setup_sorting(void) | ||
525 | { | ||
526 | char *tmp, *tok, *str = strdup(sort_order); | ||
527 | |||
528 | for (tok = strtok_r(str, ", ", &tmp); | ||
529 | tok; tok = strtok_r(NULL, ", ", &tmp)) { | ||
530 | if (sort_dimension__add(tok) < 0) { | ||
531 | error("Unknown --sort key: `%s'", tok); | ||
532 | usage_with_options(annotate_usage, options); | ||
533 | } | ||
534 | } | ||
535 | |||
536 | free(str); | ||
537 | } | ||
538 | |||
539 | int cmd_annotate(int argc, const char **argv, const char *prefix __used) | 524 | int cmd_annotate(int argc, const char **argv, const char *prefix __used) |
540 | { | 525 | { |
541 | if (symbol__init(&symbol_conf) < 0) | 526 | if (symbol__init(&symbol_conf) < 0) |
@@ -543,7 +528,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __used) | |||
543 | 528 | ||
544 | argc = parse_options(argc, argv, options, annotate_usage, 0); | 529 | argc = parse_options(argc, argv, options, annotate_usage, 0); |
545 | 530 | ||
546 | setup_sorting(); | 531 | setup_sorting(annotate_usage, options); |
547 | 532 | ||
548 | if (argc) { | 533 | if (argc) { |
549 | /* | 534 | /* |