Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1446113rdb; Fri, 16 Feb 2024 17:07:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWqmdz1XSVGo4wZnAOYSYuiuEOWdmehqkXEpNz8Zf8ixxaEdksN9hBSYrwK9qR3S8W8eUJLCLssqU4ch9xg2e6IZedDWPrC09tckEJ52Q== X-Google-Smtp-Source: AGHT+IEOMfrGRDP3KyNtdimg6A2nI2e0kGRS26RRhj8yndENSC+C5/VI2v6ck/jAbZJP3w7z5csm X-Received: by 2002:a05:6a21:1706:b0:1a0:9391:b066 with SMTP id nv6-20020a056a21170600b001a09391b066mr164647pzb.35.1708132073941; Fri, 16 Feb 2024 17:07:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708132073; cv=pass; d=google.com; s=arc-20160816; b=OTu2/LAeEui5ZCQQeqeh9FD3jRz6tKhswk3CJIKGD6t3n966OuzM5eOWQwDaZIo9W9 DuBayo6zk3EQHDyizQDCDWvPmGKlGCGdapvWi5fIXr3noon2w8aV9HgnaeINn5Qgyylu iO9DOcZvAuGMFz/cGuqgXk7odSmzSVaZUYyiTfA1rh0zdC1IXDXoDAB0A/bMnB29bebQ 8qzVG1x8ksrnL0PqwyFDf4jPHyOsH/7slKJinvzXba/9UD6iXOkDJyaI8tTUtxpWDWuT qTfBadwlIgj4jq+FQEjGIcdj0cLUpbptPhGQvp88b0GRESs3ZgCHBlfIzvlJrm77R9U1 DwEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=SFIQ3pkHQmdaVe39SLDFjOJN8P18A7ehY0Fp/CyADS4=; fh=fT6tgHucsmqImsmw3YZyEpSASkrjqttg1raWRz7Whv8=; b=QrbNLdrtx7L4DdBlXFo5CIoOvNQgR2+TzlVXHs4c+/K3MYe8SX1KJ9S3nk7lEkxpyu +UirPcaxFgrwzpYZ0aszrlzkUsHQsMdyf6XgE14MRQp3kRkwdiubiZJ1sqAhoOHXpPTC Z+BvSmJva+b7zfdoKzkM2hyAyrffF0eqILbuMISFMTdq0fqYcbjUpd3ISTN4FuDxo572 mbcTYjT0CgFi9m4su5WBnZQnRkt6k2FS40iLBcGaZNDCxMfAJD/LvRQ1VgsOCFkzDdkB AqTdd81hUrtR3pX9fiLnJwibxd8Y5q/PAhsNHfHzoAK555e2Nh0ZO+4IbSqppFUA5MwE dY6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-69622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b8-20020a056a000a8800b006e08cf5f5f8si730691pfl.3.2024.02.16.17.07.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:07:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-69622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 94C46283297 for ; Sat, 17 Feb 2024 01:07:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 181C01D543; Sat, 17 Feb 2024 01:04:15 +0000 (UTC) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B33C1B80F; Sat, 17 Feb 2024 01:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131854; cv=none; b=pCu+rKMVl+Z/OxgFSwfbRdsPG1UMmWH9xCvktTpC6X4z9UDX70k/swEg+4w8/ohbtITFW1LFjVE950/GH8ltTHbB5TqJiOq0wIgN7akvv2uJ5b8ohlixPzfg+AuW1Ta3iVr9kjHS82G06k/Rkcuyil3WZfXz1140pYBT+Pbk/wc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131854; c=relaxed/simple; bh=fDxclCaSupPXRNu51PlBmR/SJ4Ajiu5GVSt0QfQMLFM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=c8zCk28hbe0ycYz1wJBL3SMwE0e9Tu4VFDzVkI+LruxHVYZPTe+3O4++rE82aGRJram/Zk12CVLcotoU85eOf/QbsHUXiIjpxN5JNV2O+21xNn8gFGODhpNPpgwMoqpJ2n2DMgxCV2B2zstXtUpW/UECAqNCF4qaVmYhbqYe3vo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-290d59df3f0so2108091a91.2; Fri, 16 Feb 2024 17:04:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708131852; x=1708736652; 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=SFIQ3pkHQmdaVe39SLDFjOJN8P18A7ehY0Fp/CyADS4=; b=tQaT5wIWA+u4s+YuCNT5CpmLEu68TEw4LTfpXUvIQjMfoc8MEfNOPRlaLafoDkU3J1 +343bICmiVib4AysgOpRsf/QsG3jjpcc7s9FH3wZF4xupXG8wqQe5xVR6e4LA8RTYyWr ui3kcjRF8ntrXjdABwOF+1s5G0dsxC8Pg+btX+3pzyj14sDJe0XLoSStE9VUgYT1Lbgj kfCJi5cWMv5W40g/GrGgsqOdLZ8NrJgfxt2thA3kWmX3jcN8jgOSmWh+C7po+6VM50be Qa3qcE6EppJAMvTNa+dy0HGx7i2n3Q9D04zEg3P1E6q21Kaqt9cMXqiMgUBsFze56OVG CrQQ== X-Forwarded-Encrypted: i=1; AJvYcCVkQW1iyvJbFa+xFmV2uTUJmQ7pZ+sTR6ynadEB8+a9/YFp/sKnvCwLRHvzgpecRd1rSnZZ70d5P+rvD8cTt8sc7yzf8MiuiHYJus+xBLZ4cN51wFWJu3O0/x3ohcxUzcYj5nYkFEpRahP+hMWwjsEEZsR3gy5GGq0fSbFztKKbTIIewA== X-Gm-Message-State: AOJu0YyDShfc22Lu6Wp1zRFZ+TEu0ut+xwRitF6Y0K1oMWacR1pNL2NT qMDMKSl1wIOfgfQ1WiYQNbDhesNP+Tq96rq1Og/W5uZaXbSosN8UquTV3dB8EvgnzsBCvi3kye9 6S6JEej6K+t+At6YeYuVk7/NGgEw= X-Received: by 2002:a17:90b:14c:b0:298:e3aa:c2e0 with SMTP id em12-20020a17090b014c00b00298e3aac2e0mr5940601pjb.13.1708131852153; Fri, 16 Feb 2024 17:04:12 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240202234057.2085863-1-irogers@google.com> In-Reply-To: From: Namhyung Kim Date: Fri, 16 Feb 2024 17:04:01 -0800 Message-ID: Subject: Re: [PATCH v3 0/8] Clean up libperf cpumap's empty function To: Ian Rogers , Adrian Hunter , James Clark Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Suzuki K Poulose , Mike Leach , 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, Leo Yan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 14, 2024 at 2:03=E2=80=AFPM Ian Rogers wro= te: > > On Fri, Feb 2, 2024 at 3:41=E2=80=AFPM Ian Rogers wr= ote: > > > > 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. > > > > v3: Address handling of "any" is arm-spe/cs-etm patch. > > v2: 6 patches were merged by Arnaldo. New patch added ensure empty > > maps are allocated as NULL (suggested by James Clark). Hopefully a > > fix to "perf arm-spe/cs-etm: Directly iterate CPU maps". > > > > Ian Rogers (8): > > libperf cpumap: Add any, empty and min helpers > > libperf cpumap: Ensure empty cpumap is NULL from alloc > > 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 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 > > Ping. Thanks, > Ian Adrian and James, are you ok with this now? Thanks, Namhyung