Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11980902rwl; Tue, 3 Jan 2023 07:26:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtEvT8eM8gZAKaWPgmR4tENIObAPlPNUp9aVGdJtB/CHNTwxO7xgAdFz8Mux3dgdzR0fNBg X-Received: by 2002:a17:902:d48f:b0:192:a664:1b2d with SMTP id c15-20020a170902d48f00b00192a6641b2dmr22110626plg.30.1672759579307; Tue, 03 Jan 2023 07:26:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672759579; cv=none; d=google.com; s=arc-20160816; b=ZtEM2LgVHcjQYbYzRUcqD7TlDPxLXHcD6w/Er3fcWJUnpAtiUsfYwUDDo3jktXExyT L4gRsLCCY5YjKZyyTCWw5Q7vbeIxqyqV/q9X+BCmCgASuTJN1p2f6837EKp1atlwecDa LxZ94pazZzq20i1kcQyX9/AsZZjdoLyVd1GzxrkNtmPPOlc22fBg8RAiJGcn9YduTIIo DclcbZrXAVrZMQnqP5PD1WsoTS7np5P50dkuisLMaKUSLT2yBYIoCIYVEN1h5RgEUTpD QQTBjPTxdqdpJdC9PxhVyKBmHzNFuRyzvx2xFJuQNtDn3Z7Hn5YEi3qte1U8kEDFzhxZ C26w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=bW/e+jFbbbnbOjq3SiIQ/GL7KhLGpkg/nABCwnXCe+Y=; b=ooI3yMUft5qJ23/2mw4zBKV+1OY5djUMM/2Rt9Ajy7TepGzjBiowJomVNv6Z3xydOX RsoCyg1/ucNSaZDjbs+0w+xikTfs45Jp8fpCXEIhy045ar52bh0g8zKGIObEeaKArGse ABXOlMrscESikYTmDiqtIDTCl0MJ1JATPys/KQ/bjCYxjZJV44VNRvPQlgglef/qIzY3 jmkQSOeJx2VXlsp7G0EB8mfPZ3e8Eoj18WWRl2trEp9aFK4xwh+ht24ZqihHmd1EM0PI SRqyADiAGIKrZxzXD1cJ9Jcx1IHCsgJogmH63edFKSNrtUqBfsG/wfsyCi4/5vqUD51u evvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y4-20020a631804000000b00476fdba9e11si32685817pgl.622.2023.01.03.07.26.11; Tue, 03 Jan 2023 07:26:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237615AbjACPQJ (ORCPT + 60 others); Tue, 3 Jan 2023 10:16:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233237AbjACPQF (ORCPT ); Tue, 3 Jan 2023 10:16:05 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4A42C1EA; Tue, 3 Jan 2023 07:16:04 -0800 (PST) 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 8A1F91516; Tue, 3 Jan 2023 07:16:45 -0800 (PST) Received: from [10.57.41.181] (unknown [10.57.41.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A5163F587; Tue, 3 Jan 2023 07:16:00 -0800 (PST) Message-ID: <765577d3-cbdc-1371-f33e-ef6be42139dd@arm.com> Date: Tue, 3 Jan 2023 15:15:58 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2 6/7] perf cs_etm: Record ts_source in AUXTRACE_INFO for ETMv4 and ETE To: James Clark , Mike Leach Cc: linux-perf-users@vger.kernel.org, tanmay@marvell.com, sgoutham@marvell.com, gcherian@marvell.com, lcherian@marvell.com, bbhushan2@marvell.com, German Gomez , Mathieu Poirier , Leo Yan , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20221222160328.3639989-1-james.clark@arm.com> <20221222160328.3639989-7-james.clark@arm.com> <5dad3c40-d4d2-57b8-e6f5-10fa5ef1a0b8@arm.com> From: Suzuki K Poulose In-Reply-To: <5dad3c40-d4d2-57b8-e6f5-10fa5ef1a0b8@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/01/2023 11:49, James Clark wrote: > > > On 23/12/2022 09:28, Mike Leach wrote: >> Hi, >> >> There was a discussion some time ago in one of our coresight regular >> dev meetings about this. >> >> Can we just use only the necessary bits that TS source needs and leave >> the remaining bits from the 64 as unused for future expansion - i..e >> use this as a bitfield rather than have 64 bits occupied for what is >> effectively a 2 bit value. >> >> Perhaps call the full value something other than TS_SOURCE and have a >> TS_SOURCE field with a known safe unset value. > > If we did that, there wouldn't be any mechanism to detect if new values > that were added were the value 0, or just not set/implemented/saved in > the file. The current implementation of CS_ETM_NR_TRC_PARAMS allows us > to add new fields, and detect if they exist or not without bumping the > header version for each new sub field. > > In this change HAS_PARAM() has been used to do this, but that can't be > expanded to sub fields in the same 64 bits. I don't think space or > performance are worth the extra complexity of dividing it up. And > because this is just one block saved once in the header, so I'm not sure > if it's worth it in this case. It would also make it harder to read the > values on the raw dump mode. I think it is fine to use the entire field for the time source, given the header can be extended with new fields, without breaking compatibility for future additions. Suzuki > > James