diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2009-12-14 22:09:29 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2009-12-15 07:50:28 +0000 |
| commit | c8829c7a31c7e0156b230fa8d5a14be9881d7677 (patch) | |
| tree | c8649f461c5192613de3fe47b728e47a8b5c9e2c /tools/perf/builtin-annotate.c | |
| parent | perf session: Event statistics also are per session (diff) | |
| download | kernel-c8829c7a31c7e0156b230fa8d5a14be9881d7677.tar.gz kernel-c8829c7a31c7e0156b230fa8d5a14be9881d7677.zip | |
perf util: Remove setup_sorting dups
And it is also needed by 'perf diff'.
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frédéric Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
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[] = { OPT_END() }; -static void setup_sorting(void) -{ - char *tmp, *tok, *str = strdup(sort_order); - - for (tok = strtok_r(str, ", ", &tmp); - tok; tok = strtok_r(NULL, ", ", &tmp)) { - if (sort_dimension__add(tok) < 0) { - error("Unknown --sort key: `%s'", tok); - usage_with_options(annotate_usage, options); - } - } - - free(str); -} - int cmd_annotate(int argc, const char **argv, const char *prefix __used) { if (symbol__init(&symbol_conf) < 0) @@ -543,7 +528,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __used) argc = parse_options(argc, argv, options, annotate_usage, 0); - setup_sorting(); + setup_sorting(annotate_usage, options); if (argc) { /* |
