From nobody Wed Dec 17 01:31:19 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FE80187FEB; Fri, 23 Aug 2024 11:33:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724412820; cv=none; b=Crfu8yf65O9l1YPtmVy+rUwVlMPvYcWNdU5jsfmTjMLGcETPJsmYmXpa2FkTnSEzqJtO5BAFpSZ+RIxBMZUz27j5GNFTpExBhBbK3zud/x1YlLJ0eso+G4+ozo1d5LWefXAg1q0Vp6PxgzMXkuBxMmvbIoRxySV5rfnI/Y8hODg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724412820; c=relaxed/simple; bh=qC9uy8eM5i7tGdIPdUHWZAxuBI3GpsqejXPmdbCToUw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=i4+XEdsYzqOFwtgzI+G9b9jj+7+hxGZw0EjanDnkmD5MMCdphokulx+dmi5wRwvNfETS7UIf3i+Tp/bx3wkAH7A8uCpAE4ZXxXX6JxNAIO1c2/tJcK6MW3YlGILgzRVPyFmN8W2hlaFjLoWv0y69LykvB7X1+151wpleMDejdzM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C31FE1688; Fri, 23 Aug 2024 04:33:59 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 509D43F58B; Fri, 23 Aug 2024 04:33:31 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Adrian Hunter , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Jiri Olsa , Ian Rogers , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , John Garry , Will Deacon , Yicong Yang , Jonathan Cameron , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Cc: Leo Yan Subject: [PATCH v6 2/8] perf auxtrace: Use evsel__is_aux_event() for checking AUX event Date: Fri, 23 Aug 2024 12:33:00 +0100 Message-Id: <20240823113306.2310957-3-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823113306.2310957-1-leo.yan@arm.com> References: <20240823113306.2310957-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use evsel__is_aux_event() to decide if an event is a AUX event, this is a refactoring to replace comparing the PMU type. Signed-off-by: Leo Yan Reviewed-by: Adrian Hunter --- tools/perf/util/auxtrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index cbb773ed6f1a..ca8682966fae 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -671,11 +671,11 @@ int auxtrace_record__read_finish(struct auxtrace_reco= rd *itr, int idx) { struct evsel *evsel; =20 - if (!itr->evlist || !itr->pmu) + if (!itr->evlist) return -EINVAL; =20 evlist__for_each_entry(itr->evlist, evsel) { - if (evsel->core.attr.type =3D=3D itr->pmu->type) { + if (evsel__is_aux_event(evsel)) { if (evsel->disabled) return 0; return evlist__enable_event_idx(itr->evlist, evsel, idx); --=20 2.34.1