From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756186AbcETPg4 (ORCPT ); Fri, 20 May 2016 11:36:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46894 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbcETPgz (ORCPT ); Fri, 20 May 2016 11:36:55 -0400 Date: Fri, 20 May 2016 17:36:52 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf stat: Print topology/time headers with --metric-only Message-ID: <20160520153652.GA23195@krava> References: <1463754599-30786-1-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463754599-30786-1-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 20 May 2016 15:36:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 20, 2016 at 07:29:59AM -0700, Andi Kleen wrote: > From: Andi Kleen > > When --metric-only is enabled there were no headers for the topology > in interval mode. Fix this here. > > Before > > $ perf stat --metric-only -e cycles,instructions -a -I 1000 > 1.000554967 insn per cycle stalled cycles per insn > 1.000554967 0.27 > 2.000862000 0.24 > 3.001354948 0.25 > > After > > $ perf stat --metric-only -e cycles,instructions -a -I 1000 > 1.000554967 insn per cycle stalled cycles per insn > 1.000554967 0.27 > 2.000862000 0.24 > 3.001354948 0.25 hum, I'm getting something else: [jolsa@ibm-x3650m4-01 perf]$ sudo ./perf stat --topdown -I 1000 -a nmi_watchdog enabled with topdown. May give wrong results. Disable with echo 0 > /proc/sys/kernel/nmi_watchdog # time core cpus 1.001710838 retiring bad speculation frontend bound backend bound 1.001710838 S0-C0 2 38.1% -0.0% 58.8% 3.1% 1.001710838 S0-C1 2 38.0% 0.0% 59.4% 2.5% [jolsa@ibm-x3650m4-01 perf]$ sudo ./perf stat --metric-only -e cycles,instructions -a -I 1000 # time 1.000756338 insn per cycle stalled cycles per insn 1.000756338 0.32 2.001155562 0.30 jirka