Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2086455rdb; Wed, 31 Jan 2024 20:24:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqy6dzLGtjgYLsErt0UtcnkFFn+I9VfNTAt+6gPqalBr9dxmakUBuykVMH0KOgpNW87FYr X-Received: by 2002:a2e:a368:0:b0:2d0:5834:c51e with SMTP id i8-20020a2ea368000000b002d05834c51emr2690845ljn.7.1706761487948; Wed, 31 Jan 2024 20:24:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706761487; cv=pass; d=google.com; s=arc-20160816; b=n6RSGHrkaxaAWH8fKn7RZigPQD75sVYC+BNi1XNf/1D7uC8yF35hSeE0dEw5RdXBpx vykq0e07EENEb7iyI4aWcZnLrtCF4Ri+dZ4dLqtMWqEOfaYOvlZzWRVv6QgLcmUrq6Qe OY29azOP4rmD+Ew33wiIGiRANoExzQ2WpeCLciT3WSEhS08nGgEW7CSyachoBYVfyjeq okltFNWf8CThdk3eQKe85Rc0o4qRrTBiXatVIbMBnMlQBK29jVbyBtn/idPJuf10NXMC j83jOfPtm+Nzg8HNkM5jDS0kX5ZllyZqB535aLnqvU96o9vbl4itLF2qm8RqrAmyjzqr gfTQ== 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=RrRDV2OgW3nzJBdkuc2LAITTVB+J1bOMfWE+IFXHyeo=; fh=8IwdX1fof3XDs5n7t6Fq5yB6is2sZIc+TzrBRSUNYms=; b=v3tuSB4hP/vJiH85BfE8CvGlBq51qVEG27YUiGVm4K3R6L8eRqql4bzkXerWU4yVEB MVwMVHTmvCbLw2bui1d1DgL9hGTlleEr2N/sOS51P96R4nXHX83qumXmVhutCXmy9ml+ t24nwkrwJnMW0fYr/mB9anGJnXD+ewkV1HL4OaJymEzqI442ZPt6s+qdLiWQuWcJNbNK RGxDX3XoSrKufMTyo9voUI/WnmClxksb21rjO+237snXgXLSlCKRWo0zLrugHShnb0FV vtbpxGFt/nO6/9M4GD2S5YmuZalxwhSwO5Si9LN9iIgypolWMtP2nm9v5RL7JOdo4ibm I9Qg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Gaf4U68S; 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-47613-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47613-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; AJvYcCWsrv2MNB33aGos8GnGJN7svEaNvhiy/TpM5wzoZD9iKxlyd+H/As7Qe+JVepG+k9BkKu8oUv+GOBqPQUBMPxfnE7Rg/6lv6EPv2RWPhQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b6-20020a0564021f0600b0055effc0f590si3873928edb.57.2024.01.31.20.24.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 20:24:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47613-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Gaf4U68S; 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-47613-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47613-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 am.mirrors.kernel.org (Postfix) with ESMTPS id AD87A1F22545 for ; Thu, 1 Feb 2024 04:24:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D5433FE36; Thu, 1 Feb 2024 04:23:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Gaf4U68S" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 89FF73B199 for ; Thu, 1 Feb 2024 04:23:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706761386; cv=none; b=uzuUSBS+FO+p4SZ5eWz+BbxWYTZoUeXUq4Mh6/CzLS7+weRSIExecS0UdK9/EQuFM1w73T14t0vXDvojQCDEDETkQDsLPulx4ADl1OahWA1OGMIEl4RNWpA9CIGhM1m3YeczqNxZ5u+DrQUUQQ4vI6TID9/zCdsFiDCLd+vMq+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706761386; c=relaxed/simple; bh=muMEVPjwxm6q3RlQ95/IKAyqTZstFA5meu7x6+UUwZg=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=Az3M5OnLQgya7kipYH9hoVBtHQPM7LJElzk9HTue4Xv8XD8Q1ZZUuiMbbBdApxHEAQBpfUIpZfFjtb6X7RqjlAFJA/b2uQElu83pAgseaKQG9C5u8wXkn4wz8VOzKEl4/xLX0YkYlMR+Y661v/4MzAL3HcM4iwI0UeRwChQtoYs= 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=Gaf4U68S; arc=none smtp.client-ip=209.85.128.202 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-f202.google.com with SMTP id 00721157ae682-60405c0c9b0so12941867b3.1 for ; Wed, 31 Jan 2024 20:23:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706761383; x=1707366183; 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=RrRDV2OgW3nzJBdkuc2LAITTVB+J1bOMfWE+IFXHyeo=; b=Gaf4U68Sz9/QKPH9L2e8HKiqhb471OZd3yjy6feCZpg9lE2I+Yt0vV9fLFE8L5pz0g SnsBNITjMtVa0Dy29qhlXpe+rqk8okRPuUOPpAujU8j41N4yVTrr4+JIOyNLYVvbQzUP ERAtrSojrsORooiW7q9dVbSk84BC9b2yt11QfzpCJdMny8CIW/4/zQqQM7X5C3QtCvU8 oPdHkjFXcm7jPXTI338Tz/Gwo2ulzdtm//QYmEYE1OGL1bB7DSZAilcNzFqz2sSOII/h 7CANjNTdk+bQg46pELw7fpwayHHvs/ROmVsbkwzo3cAQTfLG8/+T2G+b2ivr3nmp1HA+ 5gfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706761383; x=1707366183; 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=RrRDV2OgW3nzJBdkuc2LAITTVB+J1bOMfWE+IFXHyeo=; b=ZrkwLt6cGZ+1CKz4x9TO9BP7fDkgKINsU5cHWEoQvox76AfGpSfZGhnqpR5XeSFIPN k9e1OGCkFqTGvvAVaTxNlJXcNCk6gF1eM2mGtSH8qn0RP99aRsW92qdQEvtV6vcElh87 76Rbh5w1D9Ynw674neIK1gf0aViaNLf6+8nUvrbh5twTF3Vd+kq7ZIP2aOWz9pzFulx+ 3jvCrE6ImNTj8yq7pMOJfXL4UToIl/2k1xXXhYvXr9hNVgA+dFoA0Yh2xjjPx7Pz7Mpd cNVtOKfblD8QfOF8BnJs3OhSbLU6KqvFFJ46i8bsp+FBM2akVRAItQRtQJIlv8WH4trT iDig== X-Gm-Message-State: AOJu0YwCYdDVcInJTQpjR0/a/AFca1uBA7j8RltDeOZMjX6Gry9lRZVh +B+ckvDwVVLS/BHyQ1H8vdrhF4nKhqGA3LWp3/AueZ5NNNus9Snwacylbg+ciFJZogDVfUX/TZX lgu1xfg== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:16c5:1feb:bf99:a5d1]) (user=irogers job=sendgmr) by 2002:a81:57ca:0:b0:5ff:5866:bc37 with SMTP id l193-20020a8157ca000000b005ff5866bc37mr830069ywb.3.1706761383514; Wed, 31 Jan 2024 20:23:03 -0800 (PST) Date: Wed, 31 Jan 2024 20:22:34 -0800 In-Reply-To: <20240201042236.1538928-1-irogers@google.com> Message-Id: <20240201042236.1538928-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: <20240201042236.1538928-1-irogers@google.com> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Subject: [PATCH v2 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.429.g432eaa2c6b-goog