Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5246006ybl; Tue, 27 Aug 2019 01:29:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4APgAWimeQIwrb9KTJoRCExYUIEqjM2atoD5CLhra5VdkjpFlbTLSSWI0PxoSPjhMTWHm X-Received: by 2002:a17:90a:e983:: with SMTP id v3mr23572492pjy.81.1566894599503; Tue, 27 Aug 2019 01:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566894599; cv=none; d=google.com; s=arc-20160816; b=xoMjy2p315CFHo8H14FWHDOq0fo4zPj3vz2F6+/MrGMmMuXhSu25Pr5eqZVS+FIGSv EWKjGAGlNuKtl5glu587fklLsr7Co4Rm1alRfw1/sqOuUPkVsQezKzU+upcym9y6TZ59 5UbEgOYWjWKXZYQfELHvzSZrUyoK80QxXhfLzKh4VvoXtzRpXT62/9kPma+U03ibPZH5 v1Yyp+LdpmbRuwNwrnulCPlve0zGmwIKyHyVY1+mdXhr4W5daqLcxkt4Nt+xqlN8cD4c 00QJ3VdMJoerURi1MGu9nqB1m8bWEqntVr909cy01qFEQaXJDLpeNvdCV2axQ3qwnwTc IAHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:robot-unsubscribe:robot-id:message-id :mime-version:references:in-reply-to:cc:subject:to:reply-to:from :date; bh=eGEpkcaiEKj5tA3KA6QiNpjftWUhejiQQyCslNsMmxQ=; b=pmSJsr2QqHKH444GaZLhgTPyHPwbSYJGUk/e1VFl3Z4iXAjgl9c4iIIGWAgid4yLaw DGkMBeCdZScCxOIuavde0b+0nX+PA2WSJJjs67wrWgYzyZPdZlc/tRQ1xx/Q1Gf1Srs7 DA/GSYLB7cDW8yY8BMKbcZb0/b+HqV6OBWk02ltJ1PFfFA9yVVe1+MChq80roGxYUece RPPtJkGpJ9RnYuUfQNHQy2dvJrKI5j5nFjrSTNgmaARNd1jkJ4fw9ydVp06gLcEZrVJJ LupKYlp++3XhcqAVKQKO7XOLGiaPR8JZNAN2TLPsVHDPeaDvQvT6YIU1l9veyLHbHlmg MPzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si12015051pgb.367.2019.08.27.01.29.44; Tue, 27 Aug 2019 01:29:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730087AbfH0I0g (ORCPT + 99 others); Tue, 27 Aug 2019 04:26:36 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:42801 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729852AbfH0I0a (ORCPT ); Tue, 27 Aug 2019 04:26:30 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1i2Wo2-0007qQ-Tg; Tue, 27 Aug 2019 10:26:23 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 95D471C07DC; Tue, 27 Aug 2019 10:26:17 +0200 (CEST) Date: Tue, 27 Aug 2019 08:26:17 -0000 From: tip-bot2 for Andi Kleen Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf report: Fix --ns time sort key output Cc: Andi Kleen , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20190823210338.12360-2-andi@firstfloor.org> References: <20190823210338.12360-2-andi@firstfloor.org> MIME-Version: 1.0 Message-ID: <156689437747.24515.12882688378485685652.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: 3dab6ac080dcd7f71cb9ceb84ad7dafecd6f7c07 Gitweb: https://git.kernel.org/tip/3dab6ac080dcd7f71cb9ceb84ad7dafecd6f7c07 Author: Andi Kleen AuthorDate: Fri, 23 Aug 2019 14:03:38 -07:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Mon, 26 Aug 2019 11:58:29 -03:00 perf report: Fix --ns time sort key output If the user specified --ns, the column to print the sort time stamp wasn't wide enough to actually print the full nanoseconds. Widen the time key column width when --ns is specified. Before: % perf record -a sleep 1 % perf report --sort time,overhead,symbol --stdio --ns ... 2.39% 187851.10000 [k] smp_call_function_single - - 1.53% 187851.10000 [k] intel_idle - - 0.59% 187851.10000 [.] __wcscmp_ifunc - - 0.33% 187851.10000 [.] 0000000000000000 - - 0.28% 187851.10000 [k] cpuidle_enter_state - - After: % perf report --sort time,overhead,symbol --stdio --ns ... 2.39% 187851.100000000 [k] smp_call_function_single - - 1.53% 187851.100000000 [k] intel_idle - - 0.59% 187851.100000000 [.] __wcscmp_ifunc - - 0.33% 187851.100000000 [.] 0000000000000000 - - 0.28% 187851.100000000 [k] cpuidle_enter_state - - Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190823210338.12360-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/hist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 8efbf58..3370267 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -193,7 +193,10 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h) hists__new_col_len(hists, HISTC_MEM_LVL, 21 + 3); hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12); hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12); - hists__new_col_len(hists, HISTC_TIME, 12); + if (symbol_conf.nanosecs) + hists__new_col_len(hists, HISTC_TIME, 16); + else + hists__new_col_len(hists, HISTC_TIME, 12); if (h->srcline) { len = MAX(strlen(h->srcline), strlen(sort_srcline.se_header));