perf stat: Allow tab as cvs delimiter
authorJim Cromie <jim.cromie@gmail.com>
Wed, 7 Sep 2011 23:14:03 +0000 (17:14 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 29 Sep 2011 20:04:30 +0000 (17:04 -0300)
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>
tools/perf/builtin-stat.c

index 076eda53cfba9d890affbe37f0a0dfd7ff889ac1..0ffbd97fb74f7518e884d7a3b00f080e679ce2dc 100644 (file)
@@ -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;
 
        /*