Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp507033lqt; Mon, 18 Mar 2024 14:37:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMA2pKDlzLcuJ63RVxde11iWpPxGhU8XL+OKIOnKlMmEr1jxMVZ8QkEJ9bSLC0MnFFkgPkvFfw53WPU1wEgGLalLqLaI0JzXNfcHisZQ== X-Google-Smtp-Source: AGHT+IGznNaXVihv06sN0XJt6+OKlDp6PsYjhtt4ngvPgvi++PR5TT2XZ2GKhIvkHcB5CdtCzAlj X-Received: by 2002:a05:622a:11c3:b0:430:d785:170d with SMTP id n3-20020a05622a11c300b00430d785170dmr815891qtk.0.1710797868597; Mon, 18 Mar 2024 14:37:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710797868; cv=pass; d=google.com; s=arc-20160816; b=LGGM7wnNxxz7fMDqAVnn5sqwGdM2HOoWJztBECCMYegQCPQAK89acCKvop2XgtchA/ DFNJUl1/FC/lWQ0GSEyfUUQwurXNUmoSl30W9HkKfnjDLRtH6H2MTTkzyHaz29aUXzlS 5+aEuLZtjntCUPY8U48Qdwi7iVEpWnBntJem65Mw3A8o0FNcBLxUYJsasAekmFa9ZfSH +Q4wtYVfqgTDtsETVz3lF7XYTKVoxX+d40RKlPrBRff85veHKg4L/oue0ttJWFCmrJf7 7BtpswbdlwO08N6T1HcbEw0TIUSkNUtJV7+XzRSNISIuVqbTvWDgt4r1tcoq/9pCL1xR pumw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JUi6f6pAwc+OUqTvSRPAkiruQdI+ERuGkAQMlqrxMKU=; fh=MWz1bqhjsPgINBB4Ln5MPjANTcdDQeCD7Gb15y4gQ38=; b=IpGc09o9Ry+e+3x0AqeqFbNhcQOTnn+clGFwoiV1CDNpz8VdVYNWwlo8WMHYq6IAG7 7GQvIuf1j6ttZCZg8aUqUoodQGGRIqXfyqZPq/4wGeCz212NocVSb+GnNj8YCwLejpi6 dnBqJR/H3bt2EPUbyj9ZNZodkjtewjJBpNCG8yezgIyD7ExuljY+Yt1N90pnFgb9i10c b4H8+XutzBpFnByKdAQGMioxNReAamZ+o4mNSid0KPzdZ5xN2HR3QXLkddb/5lpElV4H OPI9gxuBUtNGdGAhBMd6NzjKBQ07oIBxx2apCg3126H3xvckaSbcAs865s+/M2qPUC5u DZQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cs8yPxag; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-106712-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106712-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q8-20020a05622a04c800b0042f1ff9f462si10145152qtx.275.2024.03.18.14.37.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 14:37:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106712-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cs8yPxag; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-106712-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106712-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4E6001C21498 for ; Mon, 18 Mar 2024 21:37:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1C5C59B4F; Mon, 18 Mar 2024 21:37:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cs8yPxag" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B54658ADF; Mon, 18 Mar 2024 21:37:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710797860; cv=none; b=V+64OyJDJ8K9lB+kUd99TgqqILiDp4JI6QSeUOty1mQiYZSGxDS9zvzuIsnLI9JSCtSJ8X96PmFCvwwDVSBH/kXQk5c+pi9dVRSAcUCIhU7XcBQvfayt9GERRHNnx8stdJ2SYtRdu/DuYHHoUeEWzw3kXie3xWzV8012FtYxxaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710797860; c=relaxed/simple; bh=ddA5fr3D5LmbfEYfDAkP0jwL8eKv8+2KFsAx6wyNvQU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qu76xsVpm8wuGIYi5rHqIMxJFcHqHJvSaR+UNC5WmJ2YU0+cg1XLDW/EjDlkyl9pQKdjTvxadNavDD2eIaYp8l9oHBFbeUMfD44e+2mbLdqyugTBjHGDjcQ8MVeAkc7/ll8LhaYuHPu+R4ale9B0CoGrOX4dph4GiIFfaugcrs8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cs8yPxag; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10B04C433F1; Mon, 18 Mar 2024 21:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710797859; bh=ddA5fr3D5LmbfEYfDAkP0jwL8eKv8+2KFsAx6wyNvQU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cs8yPxagbUznXrCb64F/T27JfTQMj54nlRvrLev9KpPCam/DieIiDfaAV8E1NZ4xb r7MxltpqySX7uui9zxGNjoF51X+MWbi8PysU2iS9gdiNW4o/wC93bGbvhZN5blFRUg sg5LjDjCpbSBphBwqBad1IMb64Ao7kRu+JDLIuoMoAbZ6R91SnZ2yYC+8gGdk4Bbgp K47zmAGnDZNkTMoYcogW3pEAJpJoEGlsYNNuaRqYBqG4b7qUcThYwKrQsD0/9fOwI8 YDdhYW60V7hqPBC1sx5p5qLybADkGtLK0RBcLFXb5JEMvqcqa4k7gEiNxVP5tL2uzX WAyqzWLB8OaCQ== Date: Mon, 18 Mar 2024 18:37:36 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Adrian Hunter , James Clark , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Suzuki K Poulose , Mike Leach , 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, Leo Yan Subject: Re: [PATCH v3 0/8] Clean up libperf cpumap's empty function Message-ID: References: <20240202234057.2085863-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Mar 07, 2024 at 03:47:00PM -0800, Namhyung Kim wrote: > Hi Ian, > > Sorry for the late reply. > > On Fri, Feb 16, 2024 at 5:04 PM Namhyung Kim wrote: > > > > On Wed, Feb 14, 2024 at 2:03 PM Ian Rogers wrote: > > > > > > On Fri, Feb 2, 2024 at 3:41 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. > > > > > > > > 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? > 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. Namhyung, I noticed this hasn't been merged and applies cleanly, so I'm adding it to perf-tools-next, from your comment above can I take it as an Acked-by or even Reviewed-by? - Arnaldo