From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752343AbdKNFDy (ORCPT ); Tue, 14 Nov 2017 00:03:54 -0500 Received: from one.firstfloor.org ([193.170.194.197]:52226 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751376AbdKNFDx (ORCPT ); Tue, 14 Nov 2017 00:03:53 -0500 Date: Mon, 13 Nov 2017 21:03:51 -0800 From: Andi Kleen To: Jiri Olsa Cc: Andi Kleen , acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v1 4/5] perf, tools: Add fallback in perf_evsel__nr_cpus for no map Message-ID: <20171114050351.GE2482@two.firstfloor.org> References: <20171109145528.23371-1-andi@firstfloor.org> <20171109145528.23371-5-andi@firstfloor.org> <20171113092230.GD21325@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171113092230.GD21325@krava> 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 On Mon, Nov 13, 2017 at 10:22:30AM +0100, Jiri Olsa wrote: > On Thu, Nov 09, 2017 at 06:55:27AM -0800, Andi Kleen wrote: > > From: Andi Kleen > > > > Support the case of the event having no cpumap in perf_evsel__nr_cpus. > > Just return 1 in this case. This can happen in perf script > > when it uses the perf stat shadow functions. > > why 1, where in shadow code? you can synthesize cpus for event > via event_update event For sampling it should be always 1, right? Where: #0 0x0000000000570e03 in __perf_evsel_stat__is (evsel=0x2690ce0, id=PERF_STAT_EVSEL_ID__CYCLES_IN_TX) at util/stat.c:75 #1 0x0000000000572375 in perf_stat__update_shadow_stats (counter=0x2690ce0, count=3744, cpu=0) at util/stat-shadow.c:194 -Andi