• Gabriel Charette's avatar
    [base] Add trace events for ::GetQueueStatus and ::PeekMessage in the Win pump. · 4191829c
    Gabriel Charette authored
    CPU stack sampling profiler jank analysis is hinting at these methods
    is this a bias or is there really jank in here? Add trace events to
    balance stack sampling with slow reports.
    
    Added trace events to both MessagePumpForUI::ProcessNextWindowsMessage
    and MessagePumpForUI::WaitForWork's lookups. The stack sampling
    analysis seems to be hinting more at ProcessNextWindowsMessage for
    now, but a lot of this gets inlined in Release builds so it's hard to
    tell for sure.
    
    This CL also highlights a discrepancy between the checks in
    ProcessNextWindowsMessage and WaitForWork. WaitForWork uses
    MSG msg = {0} whereas ProcessNextWindowsMessage uses an uninitialized
    MSG object. It doesn't seem necessary for this structure to be
    initialized, will make it consistent in a follow-up CL.
    
    R=fdoray@chromium.org
    
    Bug: 899897
    Change-Id: Ibd8a43e0346e6eb7e09432582a76235ed350ae6f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2153321
    Commit-Queue: Gabriel Charette <gab@chromium.org>
    Auto-Submit: Gabriel Charette <gab@chromium.org>
    Reviewed-by: default avataroysteine <oysteine@chromium.org>
    Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#760262}
    4191829c
message_pump_win.cc 29.2 KB