From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C9A0C4332F for ; Tue, 12 Dec 2023 17:59:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377043AbjLLR7g (ORCPT ); Tue, 12 Dec 2023 12:59:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230181AbjLLR7e (ORCPT ); Tue, 12 Dec 2023 12:59:34 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1642C94 for ; Tue, 12 Dec 2023 09:59:41 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73489C433C7; Tue, 12 Dec 2023 17:59:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702403980; bh=tz+1sOWttKcl3a8KlUuaREBKUL4WYsTUmoJCIWI8J2s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=om/wqvN1PT76jVx/CfKav0nLkaf4CK4kqAC9r5+o/YFTFqzJLHV9AFhmuzmz4coDn fWzG57/kj9GpAm+RcsJS48A/3bH+zV98QatK9AWvebFMDP44ueRKvJkj4zBo87pv7B fFrEaCF70kW33lgPk7dL0BxUfuaG7uAvH/PK3mXtiUrg55cUSjJw2r6nV1ZHyyJ7kL zeLYMo0lW/ZaUtXclPRnko4YHMrqeIMR/n83FFlKHKDTycU9LDKXmnDSeXz+AcXTT0 Zelv8DCmuwKtE2ScA3Ogd/zM/KTKdvJ2jXprmgB2wLgTJ83ABdtQ7TNhrrvgqJ/l+I vnPkYllRSx33Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 945A9403EF; Tue, 12 Dec 2023 14:59:37 -0300 (-03) Date: Tue, 12 Dec 2023 14:59:37 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers , Adrian Hunter Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , John Garry , Will Deacon , Thomas Gleixner , Darren Hart , Davidlohr Bueso , =?iso-8859-1?Q?Andr=E9?= Almeida , Kan Liang , K Prateek Nayak , Sean Christopherson , Paolo Bonzini , Kajol Jain , Athira Rajeev , Andrew Jones , Alexandre Ghiti , Atish Patra , "Steinar H. Gunderson" , Yang Jihong , Yang Li , Changbin Du , Sandipan Das , Ravi Bangoria , Paran Lee , Nick Desaulniers , Huacai Chen , Yanteng Si , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org Subject: Re: [PATCH v1 00/14] Clean up libperf cpumap's empty function Message-ID: References: <20231129060211.1890454-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129060211.1890454-1-irogers@google.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Nov 28, 2023 at 10:01:57PM -0800, Ian Rogers escreveu: > Rename and clean up the use of libperf CPU map functions particularly > focussing on perf_cpu_map__empty that may return true for maps > containing CPUs but also with an "any CPU"/dummy value. > > perf_cpu_map__nr is also troubling in that iterating an empty CPU map > will yield the "any CPU"/dummy value. Reduce the appearance of some > calls to this by using the perf_cpu_map__for_each_cpu macro. > > Ian Rogers (14): > libperf cpumap: Rename perf_cpu_map__dummy_new > libperf cpumap: Rename and prefer sysfs for perf_cpu_map__default_new > libperf cpumap: Rename perf_cpu_map__empty > libperf cpumap: Replace usage of perf_cpu_map__new(NULL) > libperf cpumap: Add for_each_cpu that skips the "any CPU" case Applied 1-6, with James Reviewed-by tags, would be good to have Adrian check the PT and BTS parts, testing the end result if he things its all ok. - Arnaldo