From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752548AbbCWOIm (ORCPT ); Mon, 23 Mar 2015 10:08:42 -0400 Received: from mail.kernel.org ([198.145.29.136]:37557 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752288AbbCWOIk (ORCPT ); Mon, 23 Mar 2015 10:08:40 -0400 Date: Mon, 23 Mar 2015 11:08:38 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Minchan Kim , Joonsoo Kim Subject: Re: [PATCH 1/5] perf kmem: Print big numbers using thousands' group Message-ID: <20150323140838.GU16485@kernel.org> References: <1427092244-22764-1-git-send-email-namhyung@kernel.org> <1427092244-22764-2-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427092244-22764-2-git-send-email-namhyung@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Mar 23, 2015 at 03:30:40PM +0900, Namhyung Kim escreveu: > Like perf stat, this makes easy to read the numbers on stat like below: > > # perf kmem stat > > SUMMARY > ======= > Total bytes requested: 9,770,900 > Total bytes allocated: 9,782,712 > Total bytes wasted on internal fragmentation: 11,812 > Internal fragmentation: 0.120744% > Cross CPU allocations: 74/152,819 > > Suggested-by: Ingo Molnar > Signed-off-by: Namhyung Kim > static void print_result(struct perf_session *session) > @@ -706,6 +707,8 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused) > symbol__init(&session->header.env); > > if (!strcmp(argv[0], "stat")) { > + setlocale(LC_ALL, ""); > + Applying, but I think it is better to have this call in perf's main() routine, to avoid repeating it in each tool, as 'builtin-stat' already does this, but as this affects all tools, some further testing is needed, I think, or does anyone see any problem with that? - Arnaldo