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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD249C4338F for ; Sat, 31 Jul 2021 07:44:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EC5A60EE6 for ; Sat, 31 Jul 2021 07:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232308AbhGaHoF (ORCPT ); Sat, 31 Jul 2021 03:44:05 -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-Google-Smtp-Source: ABdhPJwlRPY/8pm/IxhL59d2iJ856M16SNNYrqVK93bnXOKLeJqia0voU1lxF64lbFo8TO0S73or2w== 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 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 X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3ECFC4338F for ; Sat, 31 Jul 2021 07:45:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BC90560EE6 for ; Sat, 31 Jul 2021 07:45:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BC90560EE6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gOvUi0n/a9IjWiRUnB0yBp0G9aY/XuY5F6VahDJotFA=; b=Mx+MsHvlxntRyN waLcMBix9QNqql1mjjvUkjlOsCU6tkpWIRtE+EYDkz37Uk11SF3cmAbxu+wLjn8ePf1+86Q/deuE9 M0Ac0G0N5Hzr63xCFFX/ZPXRG6fPO+iGBdb9rF9gRXkzfXMMxRoMTsqUBpvn2G9xEqG/FB0BfsbmS aPuFG3SF3ESYhNpYy864x+Kcb5g5tPcxYr8pmh8w9T9tVG0tjZxiR1VRZjeVZrcLplwDpJUcJhtOY Lr9YWgPZGaCJSxulzKBuZ/MP+ip2Aq9wtx5I9IWmatz89jK63EgORm1mPEn4lBIuLMtJ8LjjNCO2Y yi3V8U4pXDmEC5fYJX/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9jf6-00BCHa-Ar; Sat, 31 Jul 2021 07:44:00 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9jf2-00BCH5-NS for linux-arm-kernel@lists.infradead.org; Sat, 31 Jul 2021 07:43:58 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d1so13819503pll.1 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=Bwjqto8Sc+UKDpGj1mSNioyKGEk4ly26CZe+837ZEbXHm/hwRjH5tp/IOvJ8db3jVl hEF0ZmQfj86f251jrZ2wpmKzGMXeiKJPIX+bx7Tb5Wp3sZrR7Er6toMHTpqT9PlnuPmi yYL4Wh9BEXSKEHpe8/ckHwkjnXSjEDElkp41E75dMtM8qG3WZlb8dK9r3tiUkBLZAiry pX/HloAOox63/JK/j+IuvjoLeL5rlY53FnOMy01y5251mjiChQAum9dfA8iE9mkVtux2 SPznVucKhkDmPeu2bMl2aJceJGxWqYishW685C086TehixTBfw5i/DuoQD9Asva6H/Pm Ql9w== X-Gm-Message-State: AOAM530IkJ4Ro9oScaEqKyPOUpAMTwU/xu0G/flHDx9pPpVlxwEuiJsq PXcahYlvVahpiorJJNmE+pDCFA== X-Google-Smtp-Source: ABdhPJwlRPY/8pm/IxhL59d2iJ856M16SNNYrqVK93bnXOKLeJqia0voU1lxF64lbFo8TO0S73or2w== 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-Disposition: inline In-Reply-To: <20210721090706.21523-4-james.clark@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210731_004356_819320_A141AF3B X-CRM114-Status: GOOD ( 16.27 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel