• Francois Doray's avatar
    [gpu] Add trace events and thread priority assertion in GpuChannelHost. · 0b7197a2
    Francois Doray authored
    Traces collected through Slow Reports show that acquiring the
    GpuChannelHost lock from threads running at different priorities can
    cause priority inversions. In particular, it can cause jank on the
    renderer main thread through this chain of dependency:
    
    > Main thread: cc::ProxyMain::BeginMainFrame
      > Compositor Thread: TileManager::FlushAndIssueSignals
        > CompositorTileWorkerBackground (slow):
            OneCopyRasterBuffer::Playback
    
    This CL adds trace events to make contention on the GpuChannelHost lock
    more obvious in traces, and an assertion to ensure that the
    GpuChannelHost lock is never acquired at background thread priority.
    
    Bug: 1072756
    Change-Id: I2a25efe2e3f6e9bf5d980ca351a990f9c7d256b4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2157659
    Commit-Queue: François Doray <fdoray@chromium.org>
    Reviewed-by: default avatarVictor Miura <vmiura@chromium.org>
    Auto-Submit: François Doray <fdoray@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#823744}
    0b7197a2
gpu_channel_host.cc 14.3 KB