From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: About pmu cycle counter usage in armv8 Date: Mon, 11 Dec 2017 11:29:31 +0530 Message-ID: <20171211055930.GA15672@jerin> References: <676baa87-777b-ca6e-41c9-7233f90740b6@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" To: Jia He Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0062.outbound.protection.outlook.com [104.47.37.62]) by dpdk.org (Postfix) with ESMTP id 8A02C2C38 for ; Mon, 11 Dec 2017 06:59:51 +0100 (CET) Content-Disposition: inline In-Reply-To: <676baa87-777b-ca6e-41c9-7233f90740b6@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Mon, 11 Dec 2017 13:38:25 +0800 > From: Jia He > To: Jerin Jacob , "dev@dpdk.org" > > Subject: About pmu cycle counter usage in armv8 > User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.5.0 > > Hi Jerin > > In [1], I met a pmu cycle counter problem (all return value is 0) > occasionally. > > And then I submited a patch to kernel maillist, but was rejected by > maintainer at last [2]. > > He said: > > "We only intend for the in-kernel perf infrastructure to access > > pmccntr_el0; nothing else should touch it." Yes. That's the reason why 1) A warning added in documentation. http://dpdk.org/doc/guides/prog_guide/profile_app.html See at last " The PMU based scheme is useful for high accuracy performance profiling with rte_rdtsc(). However, this method can not be used in conjunction with Linux userspace profiling tools like perf as this scheme alters the PMU registers state. " 2) By default it is disabled and not need for production systems. Needed only for performance debugging. > > So maybe it is not proper for dpdk to use pmu cycle counter? But, There is no alternative in arm64 to get high resolution counter in user space(in performance effective way) > > [1] http://dpdk.org/ml/archives/dev/2017-November/080998.html > > [2]https://lkml.org/lkml/2017/11/16/22 > > -- > Cheers, > Jia >