gator icon indicating copy to clipboard operation
gator copied to clipboard

Why do I sometimes get all hw counter delta zero

Open peng-bo-27 opened this issue 2 years ago • 1 comments

Sorry to bother you.

I add print to the MaliDevice::dumpAllCounters_V56 function in daemon/mali_userspace/MaliDevice.cpp logg.logMessage("-------MailnameBlockIndex %u CounterIndex%u Delta %u",nameBlockIndex,counterIndex,delta);

Normally, the results are as follows [151.5372070] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex6 Delta 1039667 [151.5372419] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex7 Delta 10586 [151.5372562] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex10 Delta 708480 [151.5372694] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex18 Delta 331187

Abnormally, the results are as follows [151.8702393] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex6 Delta 0 [151.8702683] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex7 Delta 0 [151.8702905] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex10 Delta 0 [151.8703119] INFO: dumpAllCounters_V56(mali_userspace/MaliDevice.cpp:673): -------MailnameBlockIndex 0 CounterIndex18 Delta 0

My load program is always running, I try to modify collect frequency use -r low or -r high , -r low means 100HZ ( a hundred times a second ) , but nothing has changed. It's still going to be all zeros.

In same time , MalinameBlockIndex 0 CounterIndex 6 means MaliGPUCyclesGPUActive , it is always around a million. GPU utilization = MaliGPUCyclesGPUActive / (GpuFrequency / CollectFrequency) So my calculation of GPU utilization is wrong.

peng-bo-27 avatar Jun 07 '23 07:06 peng-bo-27

Hi;

Are you trying to modify gatord to print out CPU utilization stats manually? If you, you might want to look at https://github.com/ARM-software/HWCPipe instead which is a stand-alone library for collecting Mali PMU counters and integrating them into your application. Currently it only includes PMU counters, but we are in the process of adding derived metrics such as this.

Regarding the issue you are seeing, its hard to say without further information; but given the lines of code you have modified, it looks like you are using quite an old version of gatord, some one place to start might be to update to the latest version, or switch to using hwcpipe and then retrying.

The calculation looks reasonable. For reference, we publish guides for each of the different GPUs PMU counters; for example for the G77 you have https://developer.arm.com/documentation/102730/0103/GPU-activity

bengaineyarm avatar Jun 26 '23 08:06 bengaineyarm