aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c17
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
524static 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
539int cmd_annotate(int argc, const char **argv, const char *prefix __used) 524int 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 /*