lkml.org 
[lkml]   [2016]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode
On Tue, Jan 05, 2016 at 11:17:45AM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Some locales print floating point numbers with a comma instead of a dot.
> This causes problems with CSV mode because it causes extra false CSV
> fields. Force the numeric locale to be always C in CSV mode.
>
> Before:
>
> $ LC_ALL=pl_PL.utf8 perf stat -x, true
> 0,399472,,task-clock,399472,100,00 <---- extra bogus field
> ...
>
> After:
> $ LC_ALL=pl_PL.utf8 ./obj-perf/perf stat -x, true
> 0.338422,,task-clock,338422,100.00
>
> Originally reported in https://github.com/andikleen/pmu-tools/issues/43
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka


\
 
 \ /
  Last update: 2016-01-05 22:21    [W:0.050 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site