Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1202103rdb; Wed, 20 Sep 2023 02:34:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7owZbLc3emtKzeUZ+dp3/fWM6xEmfKrCv0/s4Pe9cisHlArwhzW6pL1BVliWgQvf+fKTP X-Received: by 2002:a17:903:1250:b0:1c5:59ea:84de with SMTP id u16-20020a170903125000b001c559ea84demr1702891plh.29.1695202466010; Wed, 20 Sep 2023 02:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695202465; cv=none; d=google.com; s=arc-20160816; b=MeVV7irVEFdaiIk8u98609eLT/wQmexaKnIW4rniVCdbQ4wwCj9SkQmF6Ugj0p7L9D bQzBzPpLk52/AnEOngfE1krvWcRy3B/QtqlqXtpWzXosds8TPPN0o9HszSn/AK7Obk9M Il+iiLf4qYf0rZX2Z7WE5ejD3qX40LkNC38WUvu1/GiueuGLClrBXKelF7iKL8tk+XLK /8eW4Xsa4IflVaYeJ9HBKnFfXbbbmTK1Zqmk2MmkuqNhmwHd6G5/rFwaa163vckiwiQ2 JEKeYrAwgF4G8RXigj5IqJxBoO0jsZbI/gdr+8Ik6a5Pb9/IBjoaQdSOHlOinUIWh0iC U85A== 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=x1tp9tQ0VsApF13hT1zHOkyIJ/BXuJpFRSHUVWkPEEk=; fh=1a3QGmPTxYx3IBgiQ6SIbW9F7Xq7bUvaoyldCVrvxRI=; b=g/yREo2FwtOyIsDwS6hp5b2X/BPA+PGIzJYO1pNhJ7n5ZKpR3auq9ixV+2lunSBMCu aaXWKcBEeXtLNgfT+vEUsFPD8ZNm/ZniZajq3LvdDwMg/sHk1iGcCNMONgbcS2EWbs2h HIjmNzjApLrz3t3VT0qfCv7LIxm/uXGcklWfgYrOAZnfylulg+uupcSi+0uUr88ZadI9 nM4aup12F9+8XANLQByoCuNphNMuPPHFoBOX/eOTu24I5eiAcWUifW3Vn85YivfoBdX0 08uSkZy8ouZhYCkZUpJ/7XR9LmEOxWz/X/IvfGAINrsVq8y4C/86w8kr0VZOJQv47yXz X/nQ== 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:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id ay6-20020a1709028b8600b001b8a4519706si11044295plb.19.2023.09.20.02.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 02:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 0223A80203FF; Wed, 20 Sep 2023 02:22:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233877AbjITJWo (ORCPT + 99 others); Wed, 20 Sep 2023 05:22:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233556AbjITJWm (ORCPT ); Wed, 20 Sep 2023 05:22:42 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 65BCC83; Wed, 20 Sep 2023 02:22:36 -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 756B91FB; Wed, 20 Sep 2023 02:23:13 -0700 (PDT) Received: from [10.1.197.1] (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CDD123F5A1; Wed, 20 Sep 2023 02:22:34 -0700 (PDT) Message-ID: Date: Wed, 20 Sep 2023 10:22:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH V5 - RESEND 2/3] coresight: etm: Make cycle count threshold user configurable Content-Language: en-US To: Anshuman Khandual , linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon , Mike Leach , James Clark , Leo Yan , 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: Suzuki K Poulose In-Reply-To: <20230915093649.435163-3-anshuman.khandual@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 20 Sep 2023 02:22:44 -0700 (PDT) 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. Suzuki