Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp66022lqm; Tue, 30 Apr 2024 12:57:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbKDUY+pFSkHPxQnfU2bu1ctiAILPg3/VA+pLPC/a2K9Gpt24hYsOjJFSfMOpdV2dhW1yk3TWW+JcLgL2f9Q2fcNVR1/XCaXSIYnOL5w== X-Google-Smtp-Source: AGHT+IHzgpQU6OkS93Dlm+NsKwrKbD6+GleHPNuw8Uw8kjGaQ9+AGRYGnhD4X9aHEUshl1vdXRa0 X-Received: by 2002:a05:6a20:324a:b0:1a7:5721:7011 with SMTP id hm10-20020a056a20324a00b001a757217011mr383519pzc.41.1714507074859; Tue, 30 Apr 2024 12:57:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714507074; cv=pass; d=google.com; s=arc-20160816; b=VBZ22fv2vx3/jeJN4sBCy+J8dCqW8x5ANkwwINXRs0Mob3ajWm5rZwm0uhLIIDHun2 5eAYVw7LIMIkMJxjp/X5vTlgCA/RCBjKTvJ2Yp/GBF81sM20GWiJ2jcLd9GY7tA2vSAj VNk0wrzrf4vQbyFNXNPoYojSPeOHKNdc9CdDZPj7c0N3dCl2cDukabB79bx7j1wF81Qo mDJL+p8HAP9MeBBcgVeNhlv/K5WAsiSv9MPPgK9bhWfWFUe6HXwLOLj59eJ0dXuLvlV/ jdx7IG+oBO+6RN3GfQngjIrgQBL5j3wAMYwKIKeMWoA4bw7ZxXcb2pGRsfnHVEX+Ij3z 5kUg== 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:dkim-signature:date; bh=ghnc7A+qj4DHw76Zc4PmkMS/7KxAwj/kz5TlaQ90WZI=; fh=dzNbGxLEeyoSYTNMkFm1Y6il/NXcNgO3x/5EzGdFWio=; b=V31KzX8N7DGpBaP06TE8aB6TP5SHsY2s2r+P242HFdRkALQBsTzKwWZipMYrhQy1+e /DzpjCzFYwEFpdf0dvJdHjVeZqn5raEzFuUceqVew/imrIBN5iVTRowRvZCevSA/2Zxv xHgY048Uqz8yLy+tHbhy0kU2W5cKH0DOzRT5OIWY9isgwbF/K+i8MCwppnNChGO/C8Ag BJnQCtnwOqwqDnsmECGKYM7irm8X7xKplqdPsNkW/H9hlWtmy88td43CpJwOYGa0lPXK 0rdkWxjTSgLeRHip6XUbmFoIcDrc28GTaSLTwNoE//0+Hzt5emm7t7RydSCWPiISzbvd CjwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lVj8mn6u; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-164671-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164671-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c29-20020a634e1d000000b005f3c5cf7277si21801475pgb.508.2024.04.30.12.57.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 12:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164671-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lVj8mn6u; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-164671-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164671-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 99D22287C09 for ; Tue, 30 Apr 2024 19:55:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D21A1C0DD6; Tue, 30 Apr 2024 19:51:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lVj8mn6u" Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 8A83B19DF76 for ; Tue, 30 Apr 2024 19:51:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714506691; cv=none; b=LG0llmkEOjSBW730pLC0FgmcDD1+Pr2ZZsNRzyIPTP14Ug4seUnTquL4K5nel8cuW7vHtOKKY7LezYXq6KNjMIZLAsvdlMSyNkSLRVaKLsKIWDFAv42HLcVZJAkqXn/d4kASuHJWDARfIgGU6mklhMqBeNCVDZNOhGiDpUs8gqw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714506691; c=relaxed/simple; bh=UaWvjoeb7IZoqPjtDztFt9cR9SgGUbKqNmmeR3hoe0E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sViH1FOesyDBdXfagKZw+kXDCH4Z97/+oPDgHNRhKrg4Ha0ZDje0PhvMxEgEjIpAaQXVXnn43dP0D3+Cho3dPrq+IN/mG8QgCujI9EJlh2bGGfmOj0w7nkuEAwDm18ajwAnHC4BHfJdJC6z23qTa2e7uX1ErFkzoXRVANeXElU4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=lVj8mn6u; arc=none smtp.client-ip=91.218.175.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Wed, 1 May 2024 03:51:24 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714506687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ghnc7A+qj4DHw76Zc4PmkMS/7KxAwj/kz5TlaQ90WZI=; b=lVj8mn6ue9G0BSVmk14Q+jPSoq2w3ywceBLRrdQrxNI6hh143C5M4hONAgoZ1Tenwfa7jv x3OBEdOgt1d0Krs44Hruq1VeMnmIXJRBftrk6lj/9QH7xQmgLHTCmrGV9JgojeaJlhbEbH +K0IGz0MeHhX28uYqptwDflPnT+eOys= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leo Yan To: James Clark Cc: linux-perf-users@vger.kernel.org, coresight@lists.linaro.org, Suzuki K Poulose , Mike Leach , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "Liang, Kan" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf cs-etm: Improve version detection and error reporting Message-ID: <20240430195124.GD125@debian-dev> References: <20240430133221.250811-1-james.clark@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: <20240430133221.250811-1-james.clark@arm.com> X-Migadu-Flow: FLOW_OUT On Tue, Apr 30, 2024 at 02:32:21PM +0100, James Clark wrote: > When the config validation functions are warning about ETMv3, they do it > based on "not ETMv4". If the drivers aren't all loaded or the hardware > doesn't support Coresight it will appear as "not ETMv4" and then Perf > will print the error message "... not supported in ETMv3 ..." which is > wrong and confusing. > > cs_etm_is_etmv4() is also misnamed because it also returns true for > ETE because ETE has a superset of the ETMv4 metadata files. Although > this was always done in the correct order so it wasn't a bug. > > Improve all this by making a single get version function which also > handles not present as a separate case. Change the ETMv3 error message > to only print when ETMv3 is detected, and add a new error message for > the not present case. > > Signed-off-by: James Clark Reviewed-by: Leo Yan