Add a hang monitor for the audio thread.
commitfecee0475788ffe261a233d1cc6d2d885ef7269e
authordalecurtis <dalecurtis@chromium.org>
Thu, 26 Mar 2015 00:37:44 +0000 (25 17:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 26 Mar 2015 00:38:28 +0000 (26 00:38 +0000)
tree34a07618440115d3450483b50edc4904d77ca1ee
parent36152635213bc6633b030275f0cf34d2d04dff99
Add a hang monitor for the audio thread.

We've seen a bunch of reports in the field that the audio thread is
getting hung for significant (perhaps indefinite) amounts of time;
to help debug these reports, add a hang monitor which will crash the
browser process and ensure we get a thread dump of what's going on.

The hang timer is set extremely conservatively right now, at 1 minute,
which is insanely long for audio tasks. I'll monitor crash reports and
adjust it as necessary to find culprits.

The hang monitor uses the browser I/O thread for hang checks, which is
similar to what other hung task monitors seem to do. To do this I had
to move AudioManager and MidiManager creation to after the browser
threads have been spun up. Which shouldn't be an issue...

BUG=422522, 469827
TEST=hang time exceeded ==> crash.

Review URL: https://codereview.chromium.org/1036703002

Cr-Commit-Position: refs/heads/master@{#322276}
content/browser/browser_main_loop.cc
media/audio/audio_manager.cc
media/audio/audio_manager.h