Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1143720rdb; Fri, 2 Feb 2024 15:43:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZbNVPLRsQTDuUMXRItMY3Yfmdcpcy4Vc3qD/tXcRIXE94Rc1BAYkAIauMK2a+xhTOZTEV X-Received: by 2002:a05:6358:ed06:b0:178:c2d4:d382 with SMTP id hy6-20020a056358ed0600b00178c2d4d382mr3188600rwb.10.1706917384947; Fri, 02 Feb 2024 15:43:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706917384; cv=pass; d=google.com; s=arc-20160816; b=KYa//TYUTsp2KDTSvWTqp+ePaHfz8fxEYFtWOA4t7yZf12QcysKb8u8mq4cGNqzZ5J b9eP1/l2g/XuO7mQjrJ3dPxzHlg+WNZ0A0ikWHZglcsB30wIEroOlNHmRs2PGxH6iggJ 4Rr70UOofNI46BvJVtYoNVlbLA95UxGp+PMkrL3rhjMMmRqdfRDv/4XKG+K9nBkIt4lX YIC3qTMkbMSC/luF3+IGQUtjMkpkkiMj/y2EBER1n1hj6McNyiC5xY0tQTBUn0yuxPsC M4oQ7mKFLt8Ue/fDBYG5OirF9Eh6FN306Iu/+wWELuKcvKT3xdkaAluO0yP/PBhpSHyj vqmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :dkim-signature; bh=Jm6+rGnwaR5/dop0r40XD+HXuvjfQ9BLsYsO2f1XDQM=; fh=0roXs+3tacKgdOSV5phsZeUJPczU2owPuQUCePLhOGw=; b=lAZRq2Wf6ju6BAtbSf9oiLPNul7KIVyaWoXkAPQiXmUiNNQ1BpvZStslyyQSu6dakz hFmwFF6R3Wubv8s3i+jxinxpD8irE6nASWFy1843JV2P8hpvv5aBS2dQmVgnxH3nyHDv pFLYod3o3iAu2Zx8U3f8U8Stmzav181qhWM5VA2IdLbVWPOLLzdfpwSxj4ajGgdCAYHF Wmvq1eAdEEBqL/b1EXUsaI0QRS1u0InRDIjTxau78IMOqEQ+fUlIBUMdFAVbdB43w7HO 8DJUqF8drfmTqAix7oPWdidwDFdSNMT6KMQ219fp28ZU3GcFPmr74QAQIui9jxGcKW9/ XAzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=xcg4W7LX; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-50725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCUrPeYR1IXgYrAXrY375vE5IDD0QC0qvxarCjDKFKxEhsaMhCTaaDuyBMvsmlzpy8g0YoGwD4eA/aZcU1q2QlhQg83m8WTDkHxWlzSCxg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c4-20020a05620a200400b0078331661d3dsi3068544qka.594.2024.02.02.15.43.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 15:43:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50725-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=@google.com header.s=20230601 header.b=xcg4W7LX; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-50725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 AB4781C21543 for ; Fri, 2 Feb 2024 23:43:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C9781332A5; Fri, 2 Feb 2024 23:41:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xcg4W7LX" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (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 06493132476 for ; Fri, 2 Feb 2024 23:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706917285; cv=none; b=Qn9cUdApkxvUi5OiqCJzivZhteXs2kz+O44AognBn0nw2mNuRAE3SZurFU0CPWzfE62RzxFp6DnWrLXGVc092jnsGOMOCzpq4B1wQLWiK2uWCuakox2ak/FK3l6h+LiQECT7Tzt83bfiUnXzJBZangI18jp5rBuHhcMDXCwZnN8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706917285; c=relaxed/simple; bh=0FiaP31PDhjVbhEu1bCl/SbTIvgKTkMX5fOyfQItO7k=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=cPdlq5ZfeuXRqUfHCzv8JfHd7EOfZ+lADlR10213G1ZLeGPdOOuVZDr7ujuQkcpnOkX10RMVE85sqMgxYd6ZKl4C9VxuCqXgM/LtM5rxaQxwZP7zauu0y9wsRh7IhJTVRo/ZH7aM4ldWDpvQRr/X5Dur/vQOgIhOWZtnLSrs7WM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=xcg4W7LX; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6041dbb7a78so40617437b3.0 for ; Fri, 02 Feb 2024 15:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706917283; x=1707522083; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Jm6+rGnwaR5/dop0r40XD+HXuvjfQ9BLsYsO2f1XDQM=; b=xcg4W7LXC/Lm4VGyXDbJWnjemFnNierLSmeKZwGDaq3FvGbLOZhjL6RBHwSmrdg4LN 4J/YBgwjz3bsuDcyhPgpfadd5FHgi9N4n5s/f2wq5JNeVjpZuA6HhlGVvNAmOHG4ss2v 2h6xH4iBi4gCpxIRixZVuXLwUGNIYdeDf9Q7hXNnlDlouj/WdZKoHZhgnuuG8BjnxU7l cASRrINfBVW5Yhob+Ry4VRjch4EP2OdQAI1+4ZrcY+ngfS1xjJXTIYJoAPbevkdWeAqp 1WF1sk3zSgoBMJfV7/jT/PSA4p8XTVayJ+EkOCCyPrY8MWn7L7+u3C9qQilaklEgpf6f g2pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706917283; x=1707522083; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jm6+rGnwaR5/dop0r40XD+HXuvjfQ9BLsYsO2f1XDQM=; b=QgnbzoZwVmE3v63aLuXx07oQLYZI2FuDBPz80uD+FM1HSy9PYpEvM5ODvxpbW/Dvjz sbTG6bIr0WskZrZRNNN5LeyM5xvxQDjlYKOK5oiY598GfZPh1ik70zl0aWQAIU7eOXG9 MHhR5E/SH8N6sDSjD12lVh1ITYZfCtHeelKHnQLtZExYE/qOyhYAr5fQ786xCfau/VYI ejYDFH2NrtyyRvJd64kN6tNpqVy8sRVCTS4aLUsFX5148SmidA2GGrjQzuZ+yZxtmGy8 Y4E7ZpV0ugyhNmigfOpMdseo5SQTk4ecu0skAYSGWye24BTu4VD0DFF3ekSsGfwX9crf jGrA== X-Gm-Message-State: AOJu0YxHkgSDCPMbXHqCMzkHOcnJ42cg+Bay9N6wUjpGB3SwIHS3L0ex yknLSdq6jr9rwS0krHGXz7ME949Xlv+CavYCC4Txmeu8irhVREVokBNohWqylnNq1sEMNHpFjLm KkY4KMg== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:7732:d863:503:f53d]) (user=irogers job=sendgmr) by 2002:a81:994c:0:b0:5ff:dac0:6524 with SMTP id q73-20020a81994c000000b005ffdac06524mr2160038ywg.3.1706917283080; Fri, 02 Feb 2024 15:41:23 -0800 (PST) Date: Fri, 2 Feb 2024 15:40:55 -0800 In-Reply-To: <20240202234057.2085863-1-irogers@google.com> Message-Id: <20240202234057.2085863-7-irogers@google.com> 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> X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog Subject: [PATCH v3 6/8] perf arm64 header: Remove unnecessary CPU map get and put From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , 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=20Almeida?=" , 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" In both cases the CPU map is known owned by either the caller or a PMU. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- tools/perf/arch/arm64/util/header.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/perf/arch/arm64/util/header.c b/tools/perf/arch/arm64/util/header.c index 97037499152e..a9de0b5187dd 100644 --- a/tools/perf/arch/arm64/util/header.c +++ b/tools/perf/arch/arm64/util/header.c @@ -25,8 +25,6 @@ static int _get_cpuid(char *buf, size_t sz, struct perf_cpu_map *cpus) if (!sysfs || sz < MIDR_SIZE) return EINVAL; - cpus = perf_cpu_map__get(cpus); - for (cpu = 0; cpu < perf_cpu_map__nr(cpus); cpu++) { char path[PATH_MAX]; FILE *file; @@ -51,7 +49,6 @@ static int _get_cpuid(char *buf, size_t sz, struct perf_cpu_map *cpus) break; } - perf_cpu_map__put(cpus); return ret; } -- 2.43.0.594.gd9cf4e227d-goog