From: Jim Cromie Date: Wed, 7 Sep 2011 23:14:03 +0000 (-0600) Subject: perf stat: Allow tab as cvs delimiter X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4ffd04df175f8cab711d7857173285d971a406a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git perf stat: Allow tab as cvs delimiter 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 Signed-off-by: Jim Cromie Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 076eda53cfb..0ffbd97fb74 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -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; /*