This is to report an issue in Insights. When there is a long GPU frame spike, the next GPU tags will be shown as having zero length. This is due to the way the GPU timeline is built in FGpuProfilerAnalyzer::OnEvent and the CalibrationBias “lag”.
You can see in the screenshot below that frames 1366 and 1367 are “lost” as 0-length at the end of frame 1365.
[Image Removed]
This messes up statistics by introducing false 0-length tags. If the spike is really long, there can be multiple 0-length frames in a row after the spike.
This code in insights causes the issue:
// The monolithic timeline assumes that timestamps are ever increasing, but // with gpu/cpu calibration and drift there can be a tiny bit of overlap between // frames. So we just clamp. if (ThisMinTime > LastTime) { LastTime = ThisMinTime; } ThisMinTime = LastTime;
We corrected locally it but not just clamping but also introducing a correction offset:
double CalibrationBiasCorrection = 0; while (BufferPtr < BufferEnd) { // Snip ... LastTime = double(ActualTimestamp + CalibrationBias) * 0.000001 + CalibrationBiasCorrection; // Snip … if (ThisMinTime > LastTime) { CalibrationBiasCorrection = ThisMinTime - LastTime; LastTime = ThisMinTime; } ThisMinTime = LastTime; // Snip … }
With this correction, the previously 0-length frames appear just after the long frame. CalibrationBias eventually fixes itself when the corresponding long CPU frame updates it.
I’m not sure this is the best fix, but at least the aggregate statistic are better.
Thanks