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

zhigangw zhigang.wu at linux.intel.com
Fri Jun 22 10:46:05 CEST 2018



On 2018年06月21日 18:10, Liam Girdwood wrote:
> On Thu, 2018-06-21 at 12:04 +0200, Lauda, Tomasz wrote:
>> Hi Zhigang,
>>
>>
>> I think, that correct value for 400MHz clock is:
>>
>> *#define CPU_CYCLE_PER_MS    400000000*
>>
>> *
>> *
>>
>> Tomek
>> **
>>
>>
>> On 21.06.2018 11:59, zhigangw wrote:
>>> I use this way to calculate the CPU usage in our firmware.
>>>
>>> I am not sure this way is correct or not.
>>>
>>> from this way, I found the percentage is very high when I only do the
>>> playback alone with tdm8 mode.
>>>
>>> almost 95% CPU usage.
>>>
>>> that is the reason I send this RFC.
>>>
>>> please give me the feedback whether this way to calculate the CPU
>>> usage is correct or not.
>>>
> This is broken, you are just timing DMA interrupts. Please enable verbose trace
> and you should see all the calls time stamped.
>
> Liam
I want to estimate the CPU usage.
How to estimate this with the verbose trace.
Do you have any idea?
Thanks
~zhigang
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware



More information about the Sound-open-firmware mailing list