From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08D2CC10F1A for ; Tue, 7 May 2024 10:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LKbRI/lIbLavTaTI9d7BtygKunvvlfOHEbdc/iYMt0Q=; b=uCeAjveKJbwGp1 2ANoDs4dM/jZPVClA0RR7HAg4UtnbDQaBerImC70l4TpzZ6Cd7yoFJU4eay/Bpe+3Wzf/T6JTWw67 24GdL48STWlvFW+arKoyNuqmhEHvhkYeRXzJ5YyLEXKR7Sg61CBmUMVYD49THSpVKES0qsBohIQvy GKCETj4R1IVpvM0PNm+ueJXDmVYpAyktEIa8aSQr1N4TxUW6sGdkdkcDZTUwQMcdRVjQt8QSaCaf7 cs6Zr4Brh75mmWpsfxBWgsssIbRjfODx6kciLs0MzMN+qtiLJUhVAw978O8vDGh09D9DEvgIBQ93Q 5djoZfqQXgI2XiyePG/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Hiq-0000000ASyv-1NTN; Tue, 07 May 2024 10:06:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Him-0000000ASwy-3WAd for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 10:06:55 +0000 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 4F7451063; Tue, 7 May 2024 03:07:18 -0700 (PDT) Received: from [192.168.1.100] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1C8FC3F587; Tue, 7 May 2024 03:06:48 -0700 (PDT) Message-ID: Date: Tue, 7 May 2024 11:06:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 01/17] perf cs-etm: Print error for new PERF_RECORD_AUX_OUTPUT_HW_ID versions To: Anshuman Khandual Cc: Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , 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, suzuki.poulose@arm.com, mike.leach@linaro.org References: <20240429152207.479221-1-james.clark@arm.com> <20240429152207.479221-2-james.clark@arm.com> <08bcd616-5006-45df-b8cc-45cf3a1dd762@arm.com> Content-Language: en-US From: James Clark In-Reply-To: <08bcd616-5006-45df-b8cc-45cf3a1dd762@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_030652_992491_12E99AB3 X-CRM114-Status: GOOD ( 22.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > > 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. >> + version); >> return -EINVAL; >> + } >> >> /* get access to the etm metadata */ >> etm = container_of(session->auxtrace, struct cs_etm_auxtrace, auxtrace); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel