Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1244394rdb; Wed, 20 Sep 2023 04:03:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGT7Q9J6Zyqe8NguYN313bq4+MMeCOTIZxNhWuxGeRFm45MUBNhsAQWAmAS0d5XYbI7y7CS X-Received: by 2002:a05:6a20:160c:b0:153:dff0:c998 with SMTP id l12-20020a056a20160c00b00153dff0c998mr2823590pzj.6.1695207805302; Wed, 20 Sep 2023 04:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695207805; cv=none; d=google.com; s=arc-20160816; b=kVZpJiWtTrmdytzXjBG/aZ2vkofhVtYs2ze+eNrjrrTphdyyQfrh6xZJgQYdCrHWTI QUeptl19UBsW5Lz/EyJUo82nAi8XSnIGRmZ4C/LM0Sw1d85emFrv/sPzgjlupOcnirqq QBuL0WoBj9JWNX2B6HJ9u/AknLeXcec5kdN0k3wODK54jXTt8iDIDSushpSvUENfe0Ad HrrAqOVwe1qMDYMdtpiAbXDWyqRlPZlIC95hDAqVR6nN63mtpQXKCpEoXb/Kz5Aavxhe DMlFOefCvGv+C5wBHABCIlwe+x8MXDB/AHAjhUkEt696alpApzIcdh+PEyux2UZqnQXC jQVg== 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:content-language:subject:user-agent:mime-version :date:message-id; bh=5xUYB85prOEBUjPfwraLM2O/GyRUsX7f3nasJf6LniE=; fh=NEPKLnaEIzbRDW+nZzCgzuB94HRTOURck3w+V1BCipM=; b=QbVaeiWM7gzX6uSeXzkJyWCnD0032pURoI7+IhM3Vf4ewcIVmVy03rYgP766L5L1xV GxnYRFtnAQa9iuLMjVfPCT+GzWb/eSyyL7lhHi/OaU+n0SRqgl5lSUq1ko4PL7rDcj3G Fm3qUD358coaNnptHshWBs+RLVPwg7ywLBAq10aB1l8xOGNycS2fOHivKoFf8LUij9N7 vtffTAuqJnAcZWJTZnE2q51G4pGqiiDgx2vmk3Kxsy1dmns8Q1DIcC17DDA4pXFIpU5f 1WoULCz8qGMbagnLx4tEpf4Zo+UqYwdewZKDi3Enw0bzgIv+WP+NDIfXuu85cxA19pLi CXIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bw20-20020a056a00409400b0068fcc3406acsi11379047pfb.141.2023.09.20.04.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 04:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E7B96801B712; Wed, 20 Sep 2023 03:45:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234504AbjITKpn (ORCPT + 99 others); Wed, 20 Sep 2023 06:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234444AbjITKpV (ORCPT ); Wed, 20 Sep 2023 06:45:21 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E82EA1B9; Wed, 20 Sep 2023 03:45:02 -0700 (PDT) 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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 20 Sep 2023 03:45:48 -0700 (PDT) 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.