Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp576491lqh; Tue, 7 May 2024 07:54:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQkMn1i/B/BeV/W5nygk1weHk5nGjvz/e88XPAhQoBYdOI8URUMEeIeIAZrpmbiu9+ojCn/u6lJN38wVu7gr+KUpm+tZ4eIsLq/ey1qQ== X-Google-Smtp-Source: AGHT+IFJpmCb8jsUkiUjkup3yG6qBUEEvX1KsdImgMCgueGhqXiTgoMJzrc/lHUZEI9TzsD/i8MN X-Received: by 2002:a17:906:b7c2:b0:a58:7c50:84e4 with SMTP id fy2-20020a170906b7c200b00a587c5084e4mr12294354ejb.2.1715093677487; Tue, 07 May 2024 07:54:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715093677; cv=pass; d=google.com; s=arc-20160816; b=GLIVFP2Ofjl79P9Iu2SVaZOohqVYHchlHUBHH5xZhY7lbJXB6fH1vZPu6sQ0iCk8xl 8ho+/Hy6mu6NnWy6t2L1f1SSSw8QgdKlwev9/NYImoc8n9tgysZy/F9/ivSu85W3v6Ls hNXaDvh6CQ8T4m/qYz8JQFP7Xy1p9a+Hq79zJ2PRb42Kjipbsqf7OrmPWC6iDuftVukU r4sp56G3dOu52pCAgDyddByK5WKCW2LRqaGi7UFAivpPoeaKRa7bqC4K3hdaw+ouBgrT hErcN97dARFWD4KsHYiV39Kvu8GghvwOJcEWta4i8uHNTr88G2TeOGCi/tdiUXyNNiTi 8PXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IzoHL7iSqz6RflnBNyuBQhHG3+3QMLiWAb/d4f+PQvc=; fh=EIsIpwOq3vW67Fh3n1vihDxCa22fFSzswCWPtOYBXNQ=; b=zpTjI3FIq272+ArBY6jjs/q9xgIx5FEL3sNoZ64C3T3jALWC9JZ++TURKjA7keN5gt c1q7ATdzzuuGhVLFcpK06fNqSoqJ3vXwjJRx09CTqZDAgmvyz0pb9TOc+pfh4XzDOuS6 qD33+47/XaifN5yReQKwPSHxysFwmjEUVXMK30zu6yXG3rdaG7twEYUseyqpQ0HU+iTq N1b3ifYKErXNxmJu0n7x6EC145OQfMJ5e6+u5DexE+mjJVr6m02ctVwsuQLELsm2MIXJ oTCvfAZVhNrsjxOXtbwtOa0s3snSqPjKzQfCyvfuFMya8pIaOQTneGJ9Px3mUyLxZrGD v+Nw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=maSV0SdS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171629-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171629-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id xi6-20020a170906dac600b00a526fd9e12dsi6352836ejb.548.2024.05.07.07.54.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:54:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171629-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=@kernel.org header.s=k20201202 header.b=maSV0SdS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171629-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171629-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0F3EC1F21E06 for ; Tue, 7 May 2024 14:54:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8E461607AB; Tue, 7 May 2024 14:54:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="maSV0SdS" 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 ECCC815FCFC; Tue, 7 May 2024 14:54:28 +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=1715093669; cv=none; b=hQtj2XYPI3F8JC/ddJpde+8sHHJOFbGiFvhdWp5xEx3tGRzAcOUeMg6CSaG7UTqtsKRRu1alh4w/AeFsngtu+6ug9CU2WNKQ/2u1GpFyDskdpFkuDli2V+lXpNwIqEcm1tXcH4kvuydghyMgIe6T4rd4sLMzcnfnMtNCXwYCKnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715093669; c=relaxed/simple; bh=Yskj674ZMF177lDIJTS3t2DCNKi8KbRLjMbjRBFCvDA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O/GDEwrU+twUo+OElnN9YxLiSF5I/gOeUjs+iwZ88b5aPhUhP9fsG6CNiUrx0+7xHwtJ0OLeXifrgaiyGcYKKNV1bFwXhpwh9z79AvJ/qd7Lz210NXIPoMgr9YNgMCgBZJxqcUkELk2sxEqc4umMYpidXBscZgmnbIotZvQjGbE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=maSV0SdS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F295BC2BBFC; Tue, 7 May 2024 14:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715093668; bh=Yskj674ZMF177lDIJTS3t2DCNKi8KbRLjMbjRBFCvDA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=maSV0SdSvYk9LCFNKcXLubAdxffaYIb9IBUOo8nvYgE/vbrjkokm7EXkhHi/46wbH jrQb/ujpzl8k+TDX13WUV9KSHBYjqxeSHtInzTDDQjjUwkWWWI+LB7snR8hLoGoDFf ArlNz1Nxtswsg3O23MwPQ1+TG9Pc9wg+oYxRH0rpSOnzLMlc4p/vM+7se4ojUb/PqK hgZQJY26vJkaiOlTKRJyE7iXXpXE4dw6Kr2vfGfjPLQp8dCuTyGJy74vz05Beh66ON X40v0Bpwp3eqBUIkjrIRDmOmuBIknqheXCQ4y6Ng1Rz+85tY+3YTaNWRKR33IxFFzE 4gPD9fVMOzyIw== Date: Tue, 7 May 2024 11:54:25 -0300 From: Arnaldo Carvalho de Melo To: Anshuman Khandual Cc: James Clark , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , Leo Yan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-perf-users@vger.kernel.org, gankulkarni@os.amperecomputing.com, scclevenger@os.amperecomputing.com, coresight@lists.linaro.org, mike.leach@linaro.org Subject: Re: [PATCH 01/17] perf cs-etm: Print error for new PERF_RECORD_AUX_OUTPUT_HW_ID versions Message-ID: References: <20240429152207.479221-1-james.clark@arm.com> <20240429152207.479221-2-james.clark@arm.com> <08bcd616-5006-45df-b8cc-45cf3a1dd762@arm.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=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 07, 2024 at 04:27:25PM +0530, Anshuman Khandual wrote: > On 5/7/24 15:36, James Clark wrote: > > On 07/05/2024 04:47, Anshuman Khandual wrote: > >> On 4/29/24 20:51, James Clark wrote: > >>> The likely fix for this is to update Perf so print a helpful message. > >>> > >>> Signed-off-by: James Clark > >>> --- > >>> tools/perf/util/cs-etm.c | 5 ++++- > >>> 1 file changed, 4 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > >>> index d65d7485886c..32818bd7cd17 100644 > >>> --- a/tools/perf/util/cs-etm.c > >>> +++ b/tools/perf/util/cs-etm.c > >>> @@ -335,8 +335,11 @@ static int cs_etm__process_aux_output_hw_id(struct perf_session *session, > >>> trace_chan_id = FIELD_GET(CS_AUX_HW_ID_TRACE_ID_MASK, hw_id); > >>> > >>> /* check that we can handle this version */ > >>> - if (version > CS_AUX_HW_ID_CURR_VERSION) > >>> + if (version > CS_AUX_HW_ID_CURR_VERSION) { > >>> + pr_err("CS ETM Trace: PERF_RECORD_AUX_OUTPUT_HW_ID version %d not supported. Please update Perf.\n", > >> > >> Is not this bit misleading ? PERF_RECORD_AUX_OUTPUT_HW_ID is just the perf record > >> format identifier. The record version here, is derived from the platform specific > >> hardware ID information embedded in this perf record. > > > > Not sure I follow what you mean here. 'version' is something that's > > output by the kernel. It's saved into a perf.data file, and if Perf > > can't handle version 2 for example, you need to update Perf. > Got it. > >> Should not this be just s/PERF_RECORD_AUX_OUTPUT_HW_ID/hardware ID/ instead ? > >> > > > > It's just a way to go from the error message to the part of the code or > > docs that you need to look at. "hardware ID" wouldn't lead you anywhere > > so I don't think it would be useful. > > Sure, fair enough. I'm taking this as an Acked-by, ok? - Arnaldo