From mboxrd@z Thu Jan 1 00:00:00 1970 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-Google-Smtp-Source: AGHT+IGoh7lmz+EcIMtg0X0XRqi8GKL9cy+mqlpDSRzny2NjPCRXV3K1Q1CBF5lzqtp5Qc+dmZEV+9b+bOGmUHY2hgw= 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-perf-users@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