From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbdKWHrq (ORCPT ); Thu, 23 Nov 2017 02:47:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbdKWHro (ORCPT ); Thu, 23 Nov 2017 02:47:44 -0500 Date: Thu, 23 Nov 2017 08:47:42 +0100 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org Subject: Re: Add fine grained sampled metrics for perf script Message-ID: <20171123074742.GA5587@krava> References: <20171117214300.32746-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171117214300.32746-1-andi@firstfloor.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 23 Nov 2017 07:47:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 17, 2017 at 01:42:57PM -0800, Andi Kleen wrote: SNIP > TopDown: > > Note TopDown requires disabling SMT if you have it enabled (e.g. by offlining > the extra CPUs), because SMT would require sampling per core, which is not supported. > > $ perf record -e '{ref-cycles,topdown-fetch-bubbles,topdown-recovery-bubbles,\ > topdown-slots-retired,topdown-total-slots,topdown-slots-issued}:S' -a sleep 1 > $ perf script --header -I -F cpu,ip,sym,event,metric,period > ... > [000] 121108 ref-cycles: ffffffff8165222e copy_user_enhanced_fast_string > [000] 190350 topdown-fetch-bubbles: ffffffff8165222e copy_user_enhanced_fast_string > [000] 2055 topdown-recovery-bubbles: ffffffff8165222e copy_user_enhanced_fast_string > [000] 148729 topdown-slots-retired: ffffffff8165222e copy_user_enhanced_fast_string > [000] 144324 topdown-total-slots: ffffffff8165222e copy_user_enhanced_fast_string > [000] 160852 topdown-slots-issued: ffffffff8165222e copy_user_enhanced_fast_string > [000] metric: 33.0% frontend bound > [000] metric: 3.5% bad speculation > [000] metric: 25.8% retiring > [000] metric: 37.7% backend bound > [000] 112112 ref-cycles: ffffffff8165aec8 _raw_spin_lock_irqsave > [000] 357222 topdown-fetch-bubbles: ffffffff8165aec8 _raw_spin_lock_irqsave > [000] 3325 topdown-recovery-bubbles: ffffffff8165aec8 _raw_spin_lock_irqsave > [000] 323553 topdown-slots-retired: ffffffff8165aec8 _raw_spin_lock_irqsave > [000] 270507 topdown-total-slots: ffffffff8165aec8 _raw_spin_lock_irqsave > [000] 341226 topdown-slots-issued: ffffffff8165aec8 _raw_spin_lock_irqsave > [000] metric: 33.0% frontend bound > [000] metric: 2.9% bad speculation > [000] metric: 29.9% retiring > [000] metric: 34.2% backend bound > > > Git tree: > git://git.kernel.org/pub/scm/limux/kernel/git/ak/linux-misc.git perf/script-metric-3 > > > v1: Initial post > v2: > Remove already merged patches. > Use evsel->priv for new fields > Port to new base line, support fp output. > Handle stats in ->stats, not ->priv > Minor cleanups > v3: > Enable EVENT_UPDATE in perf record, and record unit/scale/cpu map/thread map > Drop the previous zero cpu map hack. Acked-by: Jiri Olsa thanks, jirka