Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 22185CE79B0 for ; Wed, 20 Sep 2023 10:45:31 +0000 (UTC) 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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rHfu9gSNykeeEfLeanwmem0qfvChnrszPuJSF5rWYYc=; b=x9piTbG9zRjWcg XdIT6eliObFJViE63H8mSfy5zLe3fvCwraMdUA5/YDzgt8M6zpk30uoZZAsqGj/sH+3Iy3/3gyzdk SBFtNNTeiqWHU/UQ5zxZewFSiFwy8UU8SswhrI4+O+Xu1hHQ06hZzj8nI+jxy9TsxIjK21dNG6wpC 7NIk6Fj9V3q0s87dWvf0ZUltSm4y+IIII5fkEWjcJjO7cRC0JGHkdp6UPR5zoF9UD/aQwF0mCYsce cjphIYwa3us7qLDpIwYv8C7tBiUzDHVqGf/7PmIpOytI/nGoLTxAybLAHruXlwCvRrxV1x4zc1sGu IUoRl2rK6f4ASlRtwK9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiuhh-002f8G-0m; Wed, 20 Sep 2023 10:45:09 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiuhd-002f6r-2A for linux-arm-kernel@lists.infradead.org; Wed, 20 Sep 2023 10:45:07 +0000 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 B98951FB; Wed, 20 Sep 2023 03:45:39 -0700 (PDT) Received: from [10.163.63.253] (unknown [10.163.63.253]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 84ACA3F5A1; Wed, 20 Sep 2023 03:44:59 -0700 (PDT) Message-ID: <21bc7889-e456-e95b-7155-2563f1b6c3e4@arm.com> Date: Wed, 20 Sep 2023 16:14:56 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH V5 - RESEND 2/3] coresight: etm: Make cycle count threshold user configurable Content-Language: en-US To: Suzuki K Poulose , linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon , Mike Leach , Jonathan Corbet , linux-doc@vger.kernel.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org References: <20230915093649.435163-1-anshuman.khandual@arm.com> <20230915093649.435163-3-anshuman.khandual@arm.com> From: Anshuman Khandual In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230920_034505_763634_3332141C X-CRM114-Status: GOOD ( 15.30 ) 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 9/20/23 14:52, Suzuki K Poulose wrote: > On 15/09/2023 10:36, Anshuman Khandual wrote: >> Cycle counting is enabled, when requested and supported but with a default >> threshold value ETM_CYC_THRESHOLD_DEFAULT i.e 0x100 getting into TRCCCCTLR, >> representing the minimum interval between cycle count trace packets. > > minor nit: > > When Cycle counting is enabled, we use a default threshold value (0x100) for the instruction trace cycle counting. >> >> This makes cycle threshold user configurable, from the user space via perf >> event attributes. Although it falls back using ETM_CYC_THRESHOLD_DEFAULT, >> in case no explicit request. > > Minor nit: > > This patch makes the cycle threshold user configurable via perf event > attributes( 'cc_threshold' => event->attr.config3[11:0] ), falling back > to the the current default if unspecified. > > > >> As expected it creates a sysfs file as well. > > >> >> /sys/bus/event_source/devices/cs_etm/format/cc_threshold >> >> New 'cc_threshold' uses 'event->attr.config3' as no more space is available >> in 'event->attr.config1' or 'event->attr.config2'. > > Trim the above part. > > > Rest looks fine to me. Will change the commit message as follows. coresight: etm: Make cycle count threshold user configurable When cycle counting is enabled, we use a default threshold value i.e 0x100 for the instruction trace cycle counting. This patch makes the cycle threshold user configurable via perf event attributes( 'cc_threshold' => event->attr.config3[11:0] ), falling back to the current default if unspecified. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel