• David Bokan's avatar
    [Reland] Add DumpWithoutCrash for slow Mac KeyPress events · 23d79be2
    David Bokan authored
    [Reland] - This is effectively a reland, first patchset is unchanged
    https://crrev.com/74f12a609316ba81 so compare to that for changes. That
    iteration provided some interesting data but used a triggering time of 5
    seconds. I've since learned that there's a myriad of known edge-cases in
    which events might have delays of 1-20 seconds (!). In our case, we're
    specifically looking for issues at the upper end of the UMA metric (60+
    seconds) so this caused some unrelated noise. This CL relands with a
    higher threshold and some minor changes to the crash keys.
    
    Add a DumpWithoutCrash to KeyPress events where the timestamp of the OS
    differs from the current time by more than 60 seconds. We see in UMA
    that we often see events in the 95% percentile reaching many seconds of
    difference. Hopefully the crash stacks will reveal something about
    what's causing this.
    
    A previous iteration of this investigation in
    https://crrev.com/c/2111782 showed that we sometimes redispatch events
    that have been reinjected back from the renderer. This should never
    happen. This CL adds crash keys to dump some of the related app state
    to help explain how this happens.
    
    However, not all such stack traces showed reinjection so that can't be
    the cause of all these bad timestamps. This CL also adds some timing
    information to the existing crash key in NSApp:sendEvent which might
    reveal something.
    
    Bug: 1039833
    Change-Id: If49b7b8a918f880ed00a7adf219e589ed66daf6e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210867
    Commit-Queue: David Bokan <bokan@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#771059}
    23d79be2
chrome_browser_application_mac.mm 14.4 KB