Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5650584rdb; Wed, 13 Dec 2023 15:29:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4LssfGvfkE090xNCYdvI1ps/jNVsApC3bNj8ls93n3oxD/dmgKB6mrWo3Gj9dPyHDbOvH X-Received: by 2002:a05:6e02:1067:b0:35d:59a2:6913 with SMTP id q7-20020a056e02106700b0035d59a26913mr8258660ilj.64.1702510185280; Wed, 13 Dec 2023 15:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702510185; cv=none; d=google.com; s=arc-20160816; b=W3QpAP6LOnx11JNk8FYccqon5Fp3ezQtUKM7qtKuU2KrOXwczhkRT5KVTF4A36ERaE XSK03APMWDSJ5CQRRfmYQDM1b+4pNqGp6GLwwNRV1BgqucnZDGAqJFo4HXF9cdDRnCPN Ia32rHQcx2MYBTdW4qyB9YlrshI3FZUXXHTMpkBJySh8S0mCpAp4PZxG30SWzCya0tt6 GnERqSVKJjEg9q0TZgIgtsjE2mTwDOWgQf/RU1RujxyhRS+BKEV56qPqURro1QAmkDZa zDwJPh28Nki91pZriKI7YNeuScctJ6YqWKMbgfXDY4yrR7HaXeZAwKbw6vXoeamfsaC/ iReQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=++uRHZ5hzj32UPqvpJplJx8q2+3Nq+0hIQeudXz4VUc=; fh=L7ElkVAmgJUJ81khCjD+FbNv2p6EePx/UsIg/nLsnlg=; b=w6qWK3tyUjLwuPLtGyV62Mh4VNkY3+WjzBjhlYdTMrxgs+ASHpv0ecsxKiAheFYIGP 70CXDs0SJcmimHt5hQ3PItMP2AB+6C76BOO3xEsQYdTaIeYaQTNf7bcGwu3PxQnG/gYK QE4a6fv5Z9M1ibH6zqK2uOHETly0YkovBTk4M7M+1TREb6hGpMAMGNr98jNIZeqp2uck grWh1qx6g85SU+mGHfI7m/t3mTGrUiWo4oMeiLwFUUF1tfjgHeDvt7X7tkZP2AqVXpXf /J4hSbCirScoFt3xjJ3MzJAvgrF4nNAuThJ2jztveTiwKcWI10cHGIeEp7PsUYkbTDCj eCdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id o62-20020a634141000000b005c662c8da88si10180695pga.146.2023.12.13.15.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 15:29:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 11237827D0EC; Wed, 13 Dec 2023 15:29:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbjLMX3a convert rfc822-to-8bit (ORCPT + 99 others); Wed, 13 Dec 2023 18:29:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbjLMX33 (ORCPT ); Wed, 13 Dec 2023 18:29:29 -0500 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5992A3; Wed, 13 Dec 2023 15:29:35 -0800 (PST) Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-6da3a585c29so588655a34.1; Wed, 13 Dec 2023 15:29:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702510175; x=1703114975; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PFIP83rhoE54Gnfznyg7yyjOyDv3wFcoz+vENWGRUZI=; b=bf3PeOrEXQwMs0p2nrdyAyG/Focu5z5f2vhlBFivL95ukXkxMfkqUQoKZEEPATPbfo 0qwKibD7ZzWDCKeYtEruE7gzKzv7H5jnu623pBrvcLcoh6ow4bVQoUN0u3EHd1SHIYdj yqlfpcVmpppEZ/D0zuo3cCe2wHKBPsGG/K+tZjQ/kbMiKrSFyzotVh2qFq4vDbTd03w1 ElU4F//LPTWLPvCnRgkMjSCLVon1ImyR1XUWFieGNqblVDFv7dhCO+nBP21W0glvPsIL aDIFf3+gxLZAaSgskyXhg3fIUoq5Opu5LFnKdLWzhyb03DjODk+8zbMGdQg8koSITnsY rnqQ== X-Gm-Message-State: AOJu0YxLAnHvK48EAYD+NRjmY5cN90GA/iZSLvcGXf4putmKOdbAx9Bq SrN0edskYDI26EO1XEybCyLDEpYfulrAMFr7JIo= X-Received: by 2002:a05:6830:1e38:b0:6d8:7ded:6cc5 with SMTP id t24-20020a0568301e3800b006d87ded6cc5mr9225960otr.41.1702510174811; Wed, 13 Dec 2023 15:29:34 -0800 (PST) MIME-Version: 1.0 References: <20231129060211.1890454-1-irogers@google.com> In-Reply-To: <20231129060211.1890454-1-irogers@google.com> From: Namhyung Kim Date: Wed, 13 Dec 2023 15:29:23 -0800 Message-ID: Subject: Re: [PATCH v1 00/14] Clean up libperf cpumap's empty function To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , John Garry , Will Deacon , Thomas Gleixner , Darren Hart , Davidlohr Bueso , =?UTF-8?Q?Andr=C3=A9_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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 15:29:43 -0800 (PST) On Tue, Nov 28, 2023 at 10:02 PM Ian Rogers wrote: > > 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 > libperf cpumap: Add any, empty and min helpers > perf arm-spe/cs-etm: Directly iterate CPU maps > perf intel-pt/intel-bts: Switch perf_cpu_map__has_any_cpu_or_is_empty > use > perf cpumap: Clean up use of perf_cpu_map__has_any_cpu_or_is_empty > perf top: Avoid repeated function calls > perf arm64 header: Remove unnecessary CPU map get and put > perf stat: Remove duplicate cpus_map_matched function > perf cpumap: Use perf_cpu_map__for_each_cpu when possible > libperf cpumap: Document perf_cpu_map__nr's behavior Acked-by: Namhyung Kim Thanks, Namhyung