I'm doing some performance tests of my C++ program(on Linux 64bit) using Tracy profiler and I have seen a result which I can't justify in my mind. The code snippet that I measure is:
void doWork() {
MyObj obj;
while(m_channel.try_dequeue(obj) {
report(obj);
}
}
inline void report(const MyObj& obj) {
ZoneScoped;
}
Below you can see the measurements of the report() function (it is near-empty) graphically.
There are 63 report() calls. Each of them took small amount of time and 1 report() call which took big amount of time relative the previous 63 calls.There are periodical peeks as seen the graph.
I thought it is related to the ZoneScoped macro. In order to eliminate its effect, I have implemented a simple time measurement utility which just puts a timestamp to a queue. But the result is still the same.
I can't understand the reason of these peeks. Any idea is appreciated.
There is no other programs running in the Linux box at the time of testing.