Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp82634pxy; Sat, 31 Jul 2021 00:45:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTAwmoTbrDtDOaXC1WzuIQyUbI/h6+EERuANtsm7NubMObU54vxUa19lpuw5ankr0m74c7 X-Received: by 2002:a05:6638:22f:: with SMTP id f15mr5318058jaq.141.1627717525181; Sat, 31 Jul 2021 00:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627717525; cv=none; d=google.com; s=arc-20160816; b=1H5eU0qiU7i5aBryeBSubcr5ljonEt5rCOM2PpVk5oR97w/2q38ymRd/2ry4Wl64LM isQRamqhaypgJWHWUvfVsEcm5yiAwR7moGZcDEf39sRzaj2joJwbT6YZDdAGJaAtSamD 4+hlypJch6OZvc3Sk5/3qqMWwDqgRa7uoAw1D7vdinePFCvuPBdF5TPBJY2Tla5msuTu yRRe8Unmh3PWTH3IwbAu2L/UL+PDFpF7YSh/FbHH2jbJYP+z9e6UlUhZtyH0dLw5o7/8 JfjRWq/rpn7Nqrlfky3n9w8r5fAvdcrScXqY6m2Gr1TEIn/420bDC6C4iGlMwTQ5ZjyW 8HmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0bXc4+f8J7h+BNDmqSHrABgRPZcrLEP+EUPIPGuZBSg=; b=L8qLsJhqwv6KbiE/u6l5GAI9flmK7sKHewcU4HiUVafOBJjTLN0Dg2Ya5zS6IVaLtv tFiR/+V/Pw763ClTLMIoYEqHSjk1tNzXGsc417gWrNkLgbC7BadvLOytAkPcjLhsBWhn Gmfb3vRXlvCRAL4NTWiOHY9MiWLgzfw5T65kdMl5okeLeP5iM0E8IFcMQgZ6o/FK3VMC Rg2g2OVMVH1dxe/Gneh1CWYX1ny2ptqNG8qg9LCA4HHTAam2rFyom/j9LwS9nebi7GSF 1OnDpHLewiuEvmc3rjdjPHk882SslSc7Hky4b88yZgmZ134NJrpN6sSiRjPLsfsW9RGo IvZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=blBn1bdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si5290039ils.18.2021.07.31.00.45.12; Sat, 31 Jul 2021 00:45:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=blBn1bdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbhGaHoE (ORCPT + 99 others); Sat, 31 Jul 2021 03:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbhGaHoD (ORCPT ); Sat, 31 Jul 2021 03:44:03 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64EB7C0613CF for ; Sat, 31 Jul 2021 00:43:56 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id l19so18562500pjz.0 for ; Sat, 31 Jul 2021 00:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0bXc4+f8J7h+BNDmqSHrABgRPZcrLEP+EUPIPGuZBSg=; b=blBn1bdjx0Hf4LXvShmXzIy4bQIUJ9jycI0lDUNppPmirEO7h5mAx0gV7nO5jX346z U3p0hj/1qUcV1nsT28DFNsq30tBlCi0Bxl3frbMNVC93xafbGfTVKvpjWcFFOx3BU8yL HK0Dh0uDgP4GeRBYtKdLvNR4Fef0nQj28rgnH9lWLo6yNowde7McWWn4IEPghztHOHtk o+eultcLoEi8OK/uHZ3IACCj2nQPuOizNNvmwVZcJAR9nKX7cDu5I/UJ7ES6jQvluQHd kEaznNnOFuj+O35NscZ6/IjWWLbw0arQTM7WneF+T6T9KU2qHLhugSaUJkRfTbTW8pV1 Bkfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0bXc4+f8J7h+BNDmqSHrABgRPZcrLEP+EUPIPGuZBSg=; b=t5aYNHfCKfaIqPqna5/+FLxD9v5UcJwDMSATs+9zTzPWi9TfEoA+nnV3JEqJfqMCFI X53ukN3oYakrNxf91By5uV3etHff9T7Md/qBHh2DplDhbMkm06Pqwl4uSXJUZIT1OfjZ D1rEZ7eZLh7YBT+IPfFC353NPHsIe1QyMV2+ixOLvfCZrtrFaYwig0fURF0lh+7w6PGr EZZdxzPe9YF/OixTdV+gzzLXquctxKi+XC9iCq9KSXOTZSn6gJrc2gWMPIXXKG1o26sO kNqoRkY4CT9iIuHCg/12T6uuarqHDPZ3YnCNaUs3GYKqyFT9BTBlWKr2RfQ8hmkXhlEn GVEA== X-Gm-Message-State: AOAM5310qDwMjbzqdx0z/EFH5WYo/hhUAzt0grez1YSEhhsR+c95fGC1 3y8aWFLIvPhJW/xeUGW1pcvntw== X-Received: by 2002:a17:902:8a98:b029:12c:3177:c3ef with SMTP id p24-20020a1709028a98b029012c3177c3efmr5902070plo.21.1627717435852; Sat, 31 Jul 2021 00:43:55 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([204.124.181.43]) by smtp.gmail.com with ESMTPSA id j3sm4663125pfc.10.2021.07.31.00.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 00:43:55 -0700 (PDT) Date: Sat, 31 Jul 2021 15:43:43 +0800 From: Leo Yan To: James Clark Cc: acme@kernel.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, al.grant@arm.com, suzuki.poulose@arm.com, anshuman.khandual@arm.com, mike.leach@linaro.org, John Garry , Will Deacon , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 3/6] perf cs-etm: Save TRCDEVARCH register Message-ID: <20210731074343.GG7437@leoy-ThinkPad-X240s> References: <20210721090706.21523-1-james.clark@arm.com> <20210721090706.21523-4-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210721090706.21523-4-james.clark@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 21, 2021 at 10:07:02AM +0100, James Clark wrote: > Now that the metadata has a length field we can add extra registers > without breaking any previous versions of perf. > > Save the TRCDEVARCH register so that it can be used to configure the ETE > decoder in the next commit. If the sysfs file doesn't exist then 0 will > be saved which is an impossible register value and can also be used to > signify that the file couldn't be read. After reviewed the whole patch set, come back to highlight one thing: seems to me ETE is only a feature introduced by new ETMv4 revisions; in other words, if we support ETMv4.5 or any later revisions, it will support ETE feature. Here I think the right thing to do is to support newer revisions for ETMv4, and then based on the revision it creates a decoder with supporting ETE feature. For a more neat solution, if the perf tool passes the "correct" revision number to the OpenCSD decoder, it should can decode trace data with ETE packets. In this way, the ETE decoding can be transparent for perf cs-etm code. How about you think for this? Sorry if I introduce noise due to my lack knowledge (and platform) for ETE. Thanks, Leo