pcm icon indicating copy to clipboard operation
pcm copied to clipboard

What is the sample granularity of PCM when I set time interval to sample to 1s?

Open oleotiger opened this issue 2 years ago • 6 comments

The command I run : pcm 1 -nc -i=10 -csv=test.log

I set the interval to sample performance counters to 1s with command as shown above. What confused me is that the output in test.log shows that domain TIME(ticks) is 3000 ( Frequence of CPU is 3.0GHz).

Timestamps at the first column shows that samples are obeying 1s interval behavior.

But the domain TIME(Ticks) shows 3000, which means that the time it takes is 3000 clockticks ( = 1us).

Why timestamps can't be consistent when the TIME domain?

oleotiger avatar Nov 18 '21 09:11 oleotiger

other users wanted the metric expressed in "time stamp counter" cycles (TSC). TSC is well established time measure. But I agree it also makes sense to add TIME(ms) metric. Is this what you want?

opcm avatar Nov 18 '21 09:11 opcm

According to the wiki PCM Column Names Decoder Ring, TIME(ticks) here means Number of invariant clockticks.

As I set time interval as 1s, there should be 3G ticks during per interval where 1ticks ~ 0.33ns. So the value I expect on the domain TME(ticks) is 3e9. But it shows 3e3 to me. This is what really confuses me.

oleotiger avatar Nov 18 '21 09:11 oleotiger

ok, I see @twillhal the documentation should mention the miliions multiplier.

opcm avatar Nov 18 '21 10:11 opcm

So the value of TIME(ticks) should be multiplied by 1 million? Or the domain should be changed to TIME(1e6 ticks)?

oleotiger avatar Nov 18 '21 13:11 oleotiger

My proposal would be to fix the documentation by mentioning the multiplier.

twillhal avatar Nov 18 '21 18:11 twillhal

Should the value of INST be multiplied by 1million as well? In my experiment, the number of instructions is far blow my desired value.

oleotiger avatar Nov 19 '21 00:11 oleotiger