[Sound-open-firmware] [PATCH] [RFC]platform: calculate the percentage of cpu cycle

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Jun 25 08:28:20 CEST 2018


On Mon, 2018-06-25 at 11:20 +0800, zhigangw wrote:
> 
> On 2018年06月22日 18:13, Liam Girdwood wrote:
> > On Fri, 2018-06-22 at 16:46 +0800, zhigangw wrote:
> > > > Liam
> > > 
> > > I want to estimate the CPU usage.
> > > How to estimate this with the verbose trace.
> > > Do you have any idea?
> > 
> > The pipeline work can be timed by looking at the pipeline schedule start and
> > finish trace messages and the time delta between them.
> > 
> > e.g. consider a pipeline with a 1ms scheduling tick that takes 200uS to run
> > from
> > start to finish. The pipeline CPU utilisation is 20%
> > 
> > Liam
> 
> Hmm, this way would not take the scheduler period into account.
> And using the timestamp, I am not sure  whether it is accurate than 
> using the CCOUNT register.
> I will give another RFC later. please check it.
> Thanks
> ~Zhigang
> 

Trace takes all parts of the scheduler/pipeline into account. You can
enable/disable any trace message you like in order to time events. Please use
trace and move on.

Liam


More information about the Sound-open-firmware mailing list