Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp278491lqh; Mon, 6 May 2024 20:48:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2EzJf397amrqvDltPk2Eo1dXO0vhoJ0R8FE4ee/B7vb7j0I4msefzTOoeMhX+PFu9XRVxz642B0uUB6rWqt7kO/fzIlQBPn5oXM8g9A== X-Google-Smtp-Source: AGHT+IHP2yJLoihluCC2NivJrrRyo7QiDpT7GKq1+CkLjeZmawHSg1f7vWoXYPixhb/tetPK41+8 X-Received: by 2002:a05:622a:1aa1:b0:43a:1377:60f2 with SMTP id s33-20020a05622a1aa100b0043a137760f2mr15871802qtc.36.1715053680032; Mon, 06 May 2024 20:48:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715053680; cv=pass; d=google.com; s=arc-20160816; b=U4H2I9jyOHlcT9PnQw8QUyZ9UqBFHX/vMiOPFBbpJ8/aCzN2LZLvSNbjtxUNt53X6M p9Yx+Umj1kIPa8dZ1k8ZuXxlAOKhDCZVCIwPlYhXJkbY578h/OcYdo76rOvZKSz98Lu0 ezO5ds5Dxxj6NomE4dRsD+l51M77Yje4fFBe6TB6og36KDnF5Kiq3kWdJHQxFSd6kGr3 fRf4BKwR/F9USqz5rzEqmdUNqf21t+HoBP/qYe7zYb1o+qb5HBbv74MXUztKNQFjzYwX nMyhE7Rlc8pSnh14kbyW+yW9kudhZPEVuVluXbZRJs/d731oKsDXlkOaZgSDuePFUGAw 8A0w== 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=2bwqEFlyDMvM7+tTP/uPAe6x26/bHXBxrThFn36XRK0=; fh=VZwZbsQXtmVFpxvC7gcuhPF/zVY5sB/CE4c7obzPUYw=; b=BxWf5m+CGet9gmwsDQSJgr5G6QE1AQSOVz8NzVmSZ8kank6kG03+1kf4nN24YncMgV ar2Wvy9SehRv8BJjEXqcb25TFuzelVb1q0lCfqt1NO4j64nqRQe4rjWWfUCtSnebUUBz eIX3fTFvyho3yyBbORvq5GxcVZNFWmUWH95aD9G5ZgWQixQlI3aOBhFxZESawA387kJC Yr6OzU5MckCjRQcizZgm+q78VGvoyZgkzlSjbAMptJcCgXepdj99B2ePnVoGAxe8xiZV BHQnRG0wwh4hClbfE8L9OCOx2djmLpQxu9w8bvOtvzLF42Ina6qGAiPRxPX0poRxCKpd haMw==; 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-170623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o12-20020ac85a4c000000b00437c00fb70bsi11211371qta.627.2024.05.06.20.47.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 20:48:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; 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-170623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170623-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BCDF41C22073 for ; Tue, 7 May 2024 03:47:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A40442AB4; Tue, 7 May 2024 03:47:53 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0117B642; Tue, 7 May 2024 03:47:49 +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=1715053672; cv=none; b=kk8pMMwPcW7PGjcU670vL7gdKOvZhlT/65HNlWoPgDDXL/MwSN2wJqBSbaChdbZ1e5LZhhvkQJGtNVk3CHtmSHFwtoKu8zuN0W3dS7QQUUrW3WQLJJKiIS8bC9arjAXaJDsWxApf5rjpLrKito1scleom5WXlleS7ifpqGGVG38= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715053672; c=relaxed/simple; bh=kFOM3iy7Z7jag75KzlVF383Urq+3zzDGTWrSzDmdSmU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TLmH0/q+lxiXyfNhNyz+DfK63v65KCRTGLnAHGnkWjL/+ApoVfQ0t+t4zinjarMkErJmxLTWpN+h6QXhYckBRFmLW6VupPt0ibjC2oCjM+bJAPcvh0LLOe8sky6tvh/6Nhl34UpS/zVcICjDCG/lJeIiyeNW7vkCAqDdV0lO4Lo= 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 3D56B106F; Mon, 6 May 2024 20:48:09 -0700 (PDT) Received: from [10.163.33.37] (unknown [10.163.33.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 21AB23F762; Mon, 6 May 2024 20:47:34 -0700 (PDT) Message-ID: <08bcd616-5006-45df-b8cc-45cf3a1dd762@arm.com> Date: Tue, 7 May 2024 09:17:36 +0530 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: James Clark , 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 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 References: <20240429152207.479221-1-james.clark@arm.com> <20240429152207.479221-2-james.clark@arm.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: <20240429152207.479221-2-james.clark@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. Should not this be just s/PERF_RECORD_AUX_OUTPUT_HW_ID/hardware ID/ instead ? > + version); > return -EINVAL; > + } > > /* get access to the etm metadata */ > etm = container_of(session->auxtrace, struct cs_etm_auxtrace, auxtrace);