lkml.org 
[lkml]   [2015]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 40/43] perf stat report: Move csv_sep initialization before report command
    Date
    From: Jiri Olsa <jolsa@kernel.org>

    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>
    ---
    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 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)
    (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
    */
    --
    2.1.0


    \
     
     \ /
      Last update: 2015-12-17 21:21    [W:4.193 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site