Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp224337lqc; Thu, 7 Mar 2024 15:47:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWR+Ctz2/C/GbUav3qqaMk3h50TVtjnl9ZiXWltGknVMHgp6RQW7EvhogWbVEO0rfUTk+uvy8xjVWw0vshdnKfs8iyQENc18Os7H42ZFQ== X-Google-Smtp-Source: AGHT+IHHgCjVLijpZ/wAHHiQCTY/0JafX4Py35//C2zrfoX4sDXxbLYTIhK9XG8nUw9wZLepJ9yo X-Received: by 2002:a05:6a20:2056:b0:1a1:495b:6a60 with SMTP id x22-20020a056a20205600b001a1495b6a60mr8250264pzx.57.1709855244501; Thu, 07 Mar 2024 15:47:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709855244; cv=pass; d=google.com; s=arc-20160816; b=OKKeMuHTabWod/zZaJV5O7kakodO/pgzJgCZnQlSFUq/FDtNdGGViu0kp5VN1a5WiE KnoQPKrTAlhCXHvjVna+bJ9KEeqa+hWGdXWqTrZwH0X4Wdo9G8KLv8F0yBwjXfXxApQQ P048X1S6RYe35sbxK3hmXNEsg13mGsF8O0FvAb/gmTiUH8whjG6a4W8s0/CaCJqs9Qn1 VZhEDsacrPlEgonAE78rVqrAPsJgljiVss9oAZSnecWz9asO/0ZLrX5BZj3mxky6umGT /45o1o7Jq2FxRHpvgbr7adJlCaTEyuHnwCFtj1CqGuqJi5zYUzJVq75t9nrq/47yUl7D jPnQ== 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=VRglE+lg+GiCjlWhoic2nCJGJlQoZ9wZneASUD21CRs=; fh=4zLZkunPLAINO+uFAokHeWsr4byO83+0XCqR8nnQses=; b=IUy2egRlQUP9JWT8dRHQA4kAjjUQRvoAI+pwDdddE9vAkq7RXWEXkYBv9r5pUUNxpQ 53ZR4jSKmGkB0nKFLmQRtezsR4WJXLyogA0dhdCySHRFr2u5t6O46mPwd5dDhGTBJUFR a69CojiLtUxkdFqF0divLIPqz4YCi+5QXQFjICpRtDwDrEEMVFVsnlUEvwtx84oSiwzG 6/aRlg2DqaKGnT3CPTMeAaP7G8RxV+ZEYot+WkUF0nP4+g3Uc4NYqJW87NfyyxK0pc/F LmsMumQ2YQb5drji/ezxnBoTLSFnQ/8S0YoCHxVqIV15tfPYsgvO046c8i5ukYuOIVOm Vh7g==; 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-96369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ne4-20020a17090b374400b0029bae86f48asi419100pjb.124.2024.03.07.15.47.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 15:47:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96369-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4DDE2B2226A for ; Thu, 7 Mar 2024 23:47:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F8D4487BF; Thu, 7 Mar 2024 23:47:15 +0000 (UTC) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (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 5DD3B3D3BB; Thu, 7 Mar 2024 23:47:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709855234; cv=none; b=lfiASgz6KUnuDKrlC5vy117d7dIUjhNmh7M4pKRmbpNKbk85ZcUfZcYkDaar8ogiaCSP2NP4iapvu/X7aRIUQ5tnxTFhjRRBuXcKnbTy5uJUSS25lhMmPMEsfdjjTL57PsUK12v0iDTN12Io3sMWw89ONODr2P06ow3px5hTIN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709855234; c=relaxed/simple; bh=hiSn8SSIe9tegeKwF4wqEjbTESubvyzdJG8DyIQ2F5c=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=eeYUKyWAssq/PH17TdZoh610PnCZest8s0i99wfSuBm3p0IF6PglRQsPT4CTI8jzxO3Hw8b7Bl4OTQ5FjS8TSGME7hC7c890ZrGrKgepz2BsfxOY7oMHS6j2IX3HTPpFm+ojg0I1WPaxVl3QPPjbBFPyJNO9/tbaefNh2gqcu2s= 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.210.171 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-pf1-f171.google.com with SMTP id d2e1a72fcca58-6da202aa138so1038511b3a.2; Thu, 07 Mar 2024 15:47:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709855232; x=1710460032; 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=VRglE+lg+GiCjlWhoic2nCJGJlQoZ9wZneASUD21CRs=; b=TgFBz6bhZ/32RivFypCTKygjGuZ3oo+p25WazFc9QsblTtfbxKUjzIIPoFRgQDikhi /yvPFHCbI1ux8+ClRWPazLDAIZ+HYKghgx+Tomev8Lr2i+XM7rNbHC+i/FrdDL4gAokM XF42pZSvOM3cu4DhahKFJMWzceckE9m0dSvdKqQ5Wf11i7s7UVS5CgHwHG/NnA+PSPiU GN8C60vLg36Wmalz1iI5Mup8/i8Kpwuagf3xRMxfA2YAsF0kjMxxKVEg4ASQVrrGklhM RMpmNoOsuX0iP5LTyT27kweljyNc1a+PTlomOBGHxiMcCgtdUg6ttuLD+LAVtxjLxJnF ++Sw== X-Forwarded-Encrypted: i=1; AJvYcCWQzlVVNnr2G02vgUU/+wX8NFr8sp6S5eov9mq95qpWjysgdmpVWEYcZieOhtllCahMMMM+tYwNKW87vJwuEv4hbns2hyDEOi3cnDCuV15Ob1xfyeo94k2tlbKnZXKYkWK11EuVDskzSK+/DcnQGcws8kFoU2RnSsXsTAvDqB7YYszP3A== X-Gm-Message-State: AOJu0YwXAWCRmyJyYyaWA3cqooshjpUvhHNSBNsX3R0KOri3NqPhpDn9 AAOLJDfk4GsEP3QX3Yu1xLaUwF7JOA42b4sbJC+8a2t/auBT+czGpPyld383ieP9c3mbUcA9Ml/ mUxIEl8cVFyukok36zxlJQck4njo= X-Received: by 2002:a05:6a20:a99a:b0:1a0:e187:87c4 with SMTP id cc26-20020a056a20a99a00b001a0e18787c4mr8978541pzb.38.1709855232461; Thu, 07 Mar 2024 15:47: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: Thu, 7 Mar 2024 15:47:00 -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 Hi Ian, Sorry for the late reply. On Fri, Feb 16, 2024 at 5:04=E2=80=AFPM Namhyung Kim = wrote: > > On Wed, Feb 14, 2024 at 2:03=E2=80=AFPM Ian Rogers w= rote: > > > > On Fri, Feb 2, 2024 at 3:41=E2=80=AFPM 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. > > > > > > 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_emp= ty > > > 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? I think James is fine now and the Intel-pt part seems straight-forward so I'd like to merge this change. Please tell me if you have any concerns. Thanks, Namhyung