synthmark icon indicating copy to clipboard operation
synthmark copied to clipboard

Add histogram of clock frequencies

Open philburk opened this issue 7 years ago • 2 comments

Open /proc file for each CPU at start of benchmark. Read frequency periodically, accumulate in time slots. Display "heat map" ASCII chart that includes CPU index.

philburk avatar Jul 13 '18 23:07 philburk

Hi Phil, to get a precise measurement, according to something similar to the Nyquist-Shannon theorem, we should sample with a period that is half of the minimum frequency changing time. And this sampling period would be very small if we think that the frequency can change in the order of ms or less.

Moreover, /proc/cpuinfo requires root permissions to be read, so, if we have root permissions, wouldn't it be a better idea to run SynthMark while recording with systrace or trace-cmd to trace all the frequency switches on all the CPUs and then post-process the results?

Too linux-kernel-dependant?

balsini avatar Jul 14 '18 11:07 balsini

Hi Alessio, it is true we cannot detect every frequency transition by sampling /proc. The idea is just to give us a little more information in some situations. The technique is Linux specific. It is just a little extra option. Not a high priority. If we really want to see every frequency transition then systrace would be better.

philburk avatar Jul 15 '18 18:07 philburk