aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2009-12-14 22:09:29 +0000
committerIngo Molnar <[email protected]>2009-12-15 07:50:28 +0000
commitc8829c7a31c7e0156b230fa8d5a14be9881d7677 (patch)
treec8649f461c5192613de3fe47b728e47a8b5c9e2c /tools/perf/builtin-annotate.c
parentperf session: Event statistics also are per session (diff)
downloadkernel-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.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[] = {
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) {
/*