diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-11-05 09:41:01 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-12-17 14:29:06 -0500 |
commit | 6edb78a2178fd85d07b1a7fbb3629be56b860224 (patch) | |
tree | 0e789ecdc0148ff63f60c02311a7f8a68e9a678f | |
parent | 68d702f7a1202dd39d9fa01b7bea92ba9e5785d9 (diff) |
perf stat report: Move csv_sep initialization before report command
So we have csv_sep properly initialized before report command leg.
Reported-by: Kan Liang <kan.liang@intel.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1446734469-11352-18-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-stat.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index c78052580023..f9d4e0963ac7 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -1776,6 +1776,13 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1776 | (const char **) stat_usage, | 1776 | (const char **) stat_usage, |
1777 | PARSE_OPT_STOP_AT_NON_OPTION); | 1777 | PARSE_OPT_STOP_AT_NON_OPTION); |
1778 | 1778 | ||
1779 | if (csv_sep) { | ||
1780 | csv_output = true; | ||
1781 | if (!strcmp(csv_sep, "\\t")) | ||
1782 | csv_sep = "\t"; | ||
1783 | } else | ||
1784 | csv_sep = DEFAULT_SEPARATOR; | ||
1785 | |||
1779 | if (argc && !strncmp(argv[0], "rec", 3)) { | 1786 | if (argc && !strncmp(argv[0], "rec", 3)) { |
1780 | argc = __cmd_record(argc, argv); | 1787 | argc = __cmd_record(argc, argv); |
1781 | if (argc < 0) | 1788 | if (argc < 0) |
@@ -1826,13 +1833,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1826 | 1833 | ||
1827 | stat_config.output = output; | 1834 | stat_config.output = output; |
1828 | 1835 | ||
1829 | if (csv_sep) { | ||
1830 | csv_output = true; | ||
1831 | if (!strcmp(csv_sep, "\\t")) | ||
1832 | csv_sep = "\t"; | ||
1833 | } else | ||
1834 | csv_sep = DEFAULT_SEPARATOR; | ||
1835 | |||
1836 | /* | 1836 | /* |
1837 | * let the spreadsheet do the pretty-printing | 1837 | * let the spreadsheet do the pretty-printing |
1838 | */ | 1838 | */ |