Skip to content

Commit

Permalink
perf stat: Allow tab as cvs delimiter
Browse files Browse the repository at this point in the history
If option -x '\t' is given, convert '\t' to "\t".  This makes cvs
printing more flexible.

Link: http://lkml.kernel.org/r/1315437244-3788-5-git-send-email-jim.cromie@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jim Cromie authored and Arnaldo Carvalho de Melo committed Sep 29, 2011
1 parent a1bca6c commit d4ffd04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,9 +1198,11 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
}
}

if (csv_sep)
if (csv_sep) {
csv_output = true;
else
if (!strcmp(csv_sep, "\\t"))
csv_sep = "\t";
} else
csv_sep = DEFAULT_SEPARATOR;

/*
Expand Down

0 comments on commit d4ffd04

Please sign in to comment.