aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-12-14 17:09:29 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-15 02:50:28 -0500
commitc8829c7a31c7e0156b230fa8d5a14be9881d7677 (patch)
treec8649f461c5192613de3fe47b728e47a8b5c9e2c /tools/perf/builtin-report.c
parentf823e441ab4dfaeaf17832fa1931e0dc0fde304d (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-report.c')
-rw-r--r--tools/perf/builtin-report.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index d12ea4ab0d21..beff7c090d2b 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -843,21 +843,6 @@ static const struct option options[] = {
843 OPT_END() 843 OPT_END()
844}; 844};
845 845
846static void setup_sorting(void)
847{
848 char *tmp, *tok, *str = strdup(sort_order);
849
850 for (tok = strtok_r(str, ", ", &tmp);
851 tok; tok = strtok_r(NULL, ", ", &tmp)) {
852 if (sort_dimension__add(tok) < 0) {
853 error("Unknown --sort key: `%s'", tok);
854 usage_with_options(report_usage, options);
855 }
856 }
857
858 free(str);
859}
860
861static void setup_list(struct strlist **list, const char *list_str, 846static void setup_list(struct strlist **list, const char *list_str,
862 struct sort_entry *se, const char *list_name, 847 struct sort_entry *se, const char *list_name,
863 FILE *fp) 848 FILE *fp)
@@ -884,7 +869,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
884 869
885 argc = parse_options(argc, argv, options, report_usage, 0); 870 argc = parse_options(argc, argv, options, report_usage, 0);
886 871
887 setup_sorting(); 872 setup_sorting(report_usage, options);
888 873
889 if (parent_pattern != default_parent_pattern) { 874 if (parent_pattern != default_parent_pattern) {
890 sort_dimension__add("parent"); 875 sort_dimension__add("parent");