lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160105211757.GB25916@kernel.org>
Date:	Tue, 5 Jan 2016 18:17:57 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Jiri Olsa <jolsa@...hat.com>, jolsa@...nel.org, mingo@...nel.org,
	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode

Em Tue, Jan 05, 2016 at 10:05:01PM +0100, Jiri Olsa escreveu:
> On Tue, Jan 05, 2016 at 11:17:45AM -0800, Andi Kleen wrote:
> > From: Andi Kleen <ak@...ux.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@...ux.intel.com>
> 
> Acked-by: Jiri Olsa <jolsa@...nel.org>

I wonder what is that other tools do when stumbling on this, i.e.
some other tool output that produces values that have the CSV character
in it...

Completely disabling the configured locale seems too harsh to me, aren't
people used to changing the csv char via some option like we have in
'perf stat':

    -x, --field-separator

when changing the locale from the default 'C' one? Hey, you even used it
above, but you chose a CSV char that is used in this locale, oops ;-)

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ