Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp413606lqh; Tue, 7 May 2024 03:07:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV84tPECJnh5i4dSUMOOZJQND/mL8Bm1Pm5AH5Tx3E0l9GACl2v698xLziZVsuZy56PJCcTqDk3M5Dk/MKvEiy6fPdo+IqLEgia77zcMA== X-Google-Smtp-Source: AGHT+IE2e0CjPZyYYyDeCNWqWMyccw5tlrpBghzc4OSls21Q9fiAaFWBYYq7LGro9XwLpCTF/8RY X-Received: by 2002:a17:907:944e:b0:a59:bfab:b24c with SMTP id dl14-20020a170907944e00b00a59bfabb24cmr8330811ejc.63.1715076431103; Tue, 07 May 2024 03:07:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715076431; cv=pass; d=google.com; s=arc-20160816; b=YNi99pk7bHYvZOUpMWtTlMrRqumIGLMO9DtFUwsCkuqTTr3Cjng4+TSAlPfRUf10OL FRKX+N20iBrcEajicrbP6HOlp/bnhJZmdxgbhmoXVxg8KXwIfshri1tqUKCzrlfI+6Ye 1Wrt5L6nJpL7NMEPH8trAAFow3W6Q6lCTAIyLep5ldfhDIngyF6sMx9LhwRId2dC3h1S KOO+ePl0yVVvxyfx1aAXW0SDFYp2VpCb0U+WCviAgyjKzLhIMcSiaedvFgOxkUgx+3zI IqSUCNNMaX5LrbvNb2a9B6h/n/1skWKfmE+h8HRli0Zatd+Z2a3G2u/u2azMX13ZMCm8 nzMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=KQqflmT0X3xDjHsbkw/ry4PD4/FT2ceQHL1WQI9CqWI=; fh=DYfB25zITiz+NeyM0epPegKzIeSM4PEOxwx8Mpqrbs4=; b=iSG3noC1dE53vBo4tv+oqSADOgCl0SuAFU6K+rOdGUX3GNGm3acLlh8661sFR6lEjj V17r+xU9vMchtPCn5suIJygHCRWplQ7RqPV573QGE4UEMNHyQBc3x/UqkbkM9ApYSpk6 tbf+0qFNFkYv9d3qm5iPc67JX8cq49tjn6kBqa/Wets8oiWmtUEWrCtFx/ZhwrqyCOYv BocTWDhODSEbeRYYRckNECSNBAUCtvJaQaa17pAYtSqtfq2aZpnQB48jtXMKnDDKI4Dx SXTFeq5/1RLJQeYpFpcq8nrvOyokoUCmatKij4W1zdKvV0S6tMkM/Yj5YCf9rADgMR15 jt7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-171065-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171065-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id pj19-20020a170906d79300b00a59c1d61833si2894455ejb.641.2024.05.07.03.07.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 03:07:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171065-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-171065-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171065-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 CA9541F219F2 for ; Tue, 7 May 2024 10:07:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05A9A14EC53; Tue, 7 May 2024 10:06:55 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2560014E2EA; Tue, 7 May 2024 10:06:52 +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=1715076414; cv=none; b=YdEyZ7czhqxu7DVy2Wss2hUaCT66bQmTOzvQMQb9c7+PEbOJytZ7m2ysAGxRnQWYOP+nezduB2DGMh9i5Y0JDyGsY2NVwXN643uteQai8v1t8LdtfBrCt+SrShtRvNdADXDcp3t73CVi1P9fSiLKy6wkx1JCn+QNON79VDx2Xw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715076414; c=relaxed/simple; bh=lQhxSel6R2hIgp3MHzsPs3K4jk3r2cZMZQUuhQeuPwQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=h98PlSVBwbTBVp8UAmjiTkVa4fwx8MYInZXHNx5PDMPvlb06u4BcwGn57dUK+yaYjY6zbD64QkfzhiuKNQ3pNn/iVwTRUfNhYAipIAdVJXy1M+hCkAlTPzJWEDm5C7l7zH9ShYMYijcrhKWthl2i0NjcOqt/8aXj0gyVjH/7Z54= 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 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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); >