Better compositor tracking and live statistics
Builds on !2101 (merged)
If you use the fake compositor pacer and set U_PACING_LIVE_STATS=true
the pacing code will now generate lives statistics about every 1024 frames. It looks something like the below. This MR also include improvements in frame tracking so we can see the overhead of the kernel and any delays before the GPU picks up the work we scheduled. If you see the first message that the worst gpu_delay
is 0.963ms
, and it is a major contributor to the frame taking a long time.
INFO [print_and_reset] Compositor frame timing:
name median mean worst
cpu 0.008ms 0.007ms 0.014ms
draw 0.107ms 0.108ms 0.385ms
submit 0.049ms 0.049ms 0.077ms
gpu 0.175ms 0.180ms 0.386ms
gpu_delay 0.089ms 0.089ms 0.963ms
total_frame 0.380ms 0.388ms 1.509ms
WARN [wait_for_scheduled_free] 277549598.581ms: Dropping old missed frame in favour for completed new frame
INFO [print_and_reset] Compositor frame timing:
name median mean worst
cpu 0.008ms 0.007ms 0.013ms
draw 0.108ms 0.107ms 0.166ms
submit 0.049ms 0.050ms 0.118ms
gpu 0.175ms 0.175ms 0.180ms
gpu_delay 0.092ms 0.092ms 0.196ms
total_frame 0.385ms 0.384ms 0.499ms
A really large values looks like this:
name median mean worst
cpu 0.008ms 79'650.000ms 0.013ms
draw 0.105ms 1'096'130.000ms 0.166ms
submit 0.052ms 509'260.000ms 0.118ms
gpu 0.174ms 1'745'250.000ms 0.180ms
gpu_delay 0.089ms 903'380.000ms 0.196ms
total_frame 0.382ms 3'840'680.000ms 0.499ms