Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966805AbbLRJS7 (ORCPT ); Fri, 18 Dec 2015 04:18:59 -0500 Received: from terminus.zytor.com ([198.137.202.10]:52585 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934961AbbLRJNY (ORCPT ); Fri, 18 Dec 2015 04:13:24 -0500 Date: Fri, 18 Dec 2015 01:13:08 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, jolsa@kernel.org, acme@redhat.com, dsahern@gmail.com, a.p.zijlstra@chello.nl, tglx@linutronix.de, kan.liang@intel.com, namhyung@kernel.org Reply-To: acme@redhat.com, dsahern@gmail.com, a.p.zijlstra@chello.nl, mingo@kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, hpa@zytor.com, namhyung@kernel.org, tglx@linutronix.de, kan.liang@intel.com In-Reply-To: <1446734469-11352-18-git-send-email-jolsa@kernel.org> References: <1446734469-11352-18-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf stat report: Move csv_sep initialization before report command Git-Commit-ID: 6edb78a2178fd85d07b1a7fbb3629be56b860224 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2042 Lines: 59 Commit-ID: 6edb78a2178fd85d07b1a7fbb3629be56b860224 Gitweb: http://git.kernel.org/tip/6edb78a2178fd85d07b1a7fbb3629be56b860224 Author: Jiri Olsa AuthorDate: Thu, 5 Nov 2015 15:41:01 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 17 Dec 2015 16:29:06 -0300 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 Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1446734469-11352-18-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index c780525..f9d4e09 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) (const char **) stat_usage, PARSE_OPT_STOP_AT_NON_OPTION); + if (csv_sep) { + csv_output = true; + if (!strcmp(csv_sep, "\\t")) + csv_sep = "\t"; + } else + csv_sep = DEFAULT_SEPARATOR; + if (argc && !strncmp(argv[0], "rec", 3)) { argc = __cmd_record(argc, argv); if (argc < 0) @@ -1826,13 +1833,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused) stat_config.output = output; - if (csv_sep) { - csv_output = true; - if (!strcmp(csv_sep, "\\t")) - csv_sep = "\t"; - } else - csv_sep = DEFAULT_SEPARATOR; - /* * let the spreadsheet do the pretty-printing */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/