From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752809AbcETOPn (ORCPT ); Fri, 20 May 2016 10:15:43 -0400 Received: from one.firstfloor.org ([193.170.194.197]:45571 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751517AbcETOPm (ORCPT ); Fri, 20 May 2016 10:15:42 -0400 Date: Fri, 20 May 2016 07:15:38 -0700 From: Andi Kleen To: Jiri Olsa Cc: Andi Kleen , Andi Kleen , acme@kernel.org, peterz@infradead.org, jolsa@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/8] perf stat: Add computation of TopDown formulas Message-ID: <20160520141538.GR13997@two.firstfloor.org> References: <1463190297-17408-1-git-send-email-andi@firstfloor.org> <1463190297-17408-9-git-send-email-andi@firstfloor.org> <20160520102327.GB28818@krava> <20160520133833.GU11177@tassilo.jf.intel.com> <20160520134346.GA27581@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160520134346.GA27581@krava> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 20, 2016 at 03:43:46PM +0200, Jiri Olsa wrote: > On Fri, May 20, 2016 at 06:38:33AM -0700, Andi Kleen wrote: > > > > @@ -82,6 +87,12 @@ void perf_stat__reset_shadow_stats(void) > > > > sizeof(runtime_transaction_stats)); > > > > memset(runtime_elision_stats, 0, sizeof(runtime_elision_stats)); > > > > memset(&walltime_nsecs_stats, 0, sizeof(walltime_nsecs_stats)); > > > > + memset(runtime_topdown_total_slots, 0, sizeof(runtime_topdown_total_slots)); > > > > + memset(runtime_topdown_slots_retired, 0, sizeof(runtime_topdown_slots_retired)); > > > > + memset(runtime_topdown_slots_issued, 0, sizeof(runtime_topdown_slots_issued)); > > > > + memset(runtime_topdown_fetch_bubbles, 0, sizeof(runtime_topdown_fetch_bubbles)); > > > > + memset(runtime_topdown_recovery_bubbles, 0, sizeof(runtime_topdown_recovery_bubbles)); > > > > + have_frontend_stalled = pmu_have_event("cpu", "stalled-cycles-frontend"); > > > > > > why to initialize this one in here? it's already in perf_stat__init_shadow_stats > > > > You mean the have_frontend_stalled? > > > > I don't think it's in init_shadow_stats yet, but it could be moved. > > > > fb4605ba47e7 perf stat: Check for frontend stalled for metrics > > +void perf_stat__init_shadow_stats(void) > +{ > + have_frontend_stalled = pmu_have_event("cpu", "stalled-cycles-frontend"); > +} Ok I removed the line and posted a new patch. Thanks. -Andi