Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Issue 2245333004: Convert AVDAs thread hang detection to be timer based (Closed)

Created:
4 years, 4 months ago by watk
Modified:
4 years, 4 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert AVDAs thread hang detection to be timer based Previously AVDAManager counted the number of tasks pending on the construction thread and considered the thread hung when that number exceeded a threshold. Now we use a MessageLoop::TaskObserver to watch how long tasks take. If a task takes longer than 800ms it's considered hung. This mechanism should be more robust because we don't have to worry about counting the tasks correctly. BUG=638406 Committed: https://crrev.com/d8e0dfd15ced352e5a4128553397609fb08f4c00 Cr-Commit-Position: refs/heads/master@{#413527}

Patch Set 1 #

Total comments: 2

Patch Set 2 : timeout #

Total comments: 4

Patch Set 3 : Addressed comments. Added thread stopping back. #

Total comments: 5

Patch Set 4 : Renamed to IsThreadLikelyHung #

Patch Set 5 : rename IsAutodetection... #

Total comments: 4

Patch Set 6 : clarified comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -94 lines) Patch
M media/gpu/android_video_decode_accelerator.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 1 2 3 4 5 14 chunks +90 lines, -91 lines 0 comments Download

Messages

Total messages: 34 (11 generated)
watk
WDYT?
4 years, 4 months ago (2016-08-16 22:58:48 UTC) #2
liberato (no reviews please)
i rather like it. might pull it out of avda, though. -fl https://codereview.chromium.org/2245333004/diff/1/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc ...
4 years, 4 months ago (2016-08-16 23:08:36 UTC) #3
DaleCurtis
Have you looked at MessageLoop::TaskObserver? WillProcessTask/DidProcessTask?
4 years, 4 months ago (2016-08-16 23:59:17 UTC) #5
watk
On 2016/08/16 23:59:17, DaleCurtis wrote: > Have you looked at MessageLoop::TaskObserver? WillProcessTask/DidProcessTask? Yeah, that works ...
4 years, 4 months ago (2016-08-17 00:08:12 UTC) #6
watk
On 2016/08/17 00:08:12, watk wrote: > On 2016/08/16 23:59:17, DaleCurtis wrote: > > Have you ...
4 years, 4 months ago (2016-08-17 00:15:54 UTC) #7
DaleCurtis
Yeah, that's what I was thinking. You only need to worry about suspend on desktop ...
4 years, 4 months ago (2016-08-17 01:00:42 UTC) #8
watk
On 2016/08/17 01:00:42, DaleCurtis wrote: > Yeah, that's what I was thinking. You only need ...
4 years, 4 months ago (2016-08-17 01:20:27 UTC) #9
DaleCurtis
lg2m - defer to frank on final review. https://codereview.chromium.org/2245333004/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2245333004/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode212 media/gpu/android_video_decode_accelerator.cc:212: if ...
4 years, 4 months ago (2016-08-17 04:58:46 UTC) #10
liberato (no reviews please)
https://codereview.chromium.org/2245333004/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2245333004/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode257 media/gpu/android_video_decode_accelerator.cc:257: thread_avda_instances_.erase(avda); if we end up not resetting below, then ...
4 years, 4 months ago (2016-08-17 15:15:42 UTC) #11
watk
I went back and forth on whether to leak the thread or not.. According to ...
4 years, 4 months ago (2016-08-19 22:52:18 UTC) #14
DaleCurtis
https://codereview.chromium.org/2245333004/diff/60001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2245333004/diff/60001/media/gpu/android_video_decode_accelerator.cc#newcode206 media/gpu/android_video_decode_accelerator.cc:206: bool ThreadLikelyHung() { IsThreadLikelyHung? https://codereview.chromium.org/2245333004/diff/60001/media/gpu/android_video_decode_accelerator.cc#newcode259 media/gpu/android_video_decode_accelerator.cc:259: construction_thread_.task_runner()->PostTaskAndReply( Clever! https://codereview.chromium.org/2245333004/diff/60001/media/gpu/android_video_decode_accelerator.cc#newcode1141 ...
4 years, 4 months ago (2016-08-19 22:56:03 UTC) #15
watk
https://codereview.chromium.org/2245333004/diff/60001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2245333004/diff/60001/media/gpu/android_video_decode_accelerator.cc#newcode206 media/gpu/android_video_decode_accelerator.cc:206: bool ThreadLikelyHung() { On 2016/08/19 22:56:03, DaleCurtis wrote: > ...
4 years, 4 months ago (2016-08-19 23:22:28 UTC) #16
DaleCurtis
lgtm, is it worth having both methods though?
4 years, 4 months ago (2016-08-19 23:24:34 UTC) #17
watk
On 2016/08/19 23:24:34, DaleCurtis wrote: > lgtm, is it worth having both methods though? I ...
4 years, 4 months ago (2016-08-19 23:30:38 UTC) #18
DaleCurtis
On 2016/08/19 at 23:30:38, watk wrote: > On 2016/08/19 23:24:34, DaleCurtis wrote: > > lgtm, ...
4 years, 4 months ago (2016-08-20 00:04:20 UTC) #19
watk
On 2016/08/20 00:04:20, DaleCurtis wrote: > On 2016/08/19 at 23:30:38, watk wrote: > > On ...
4 years, 4 months ago (2016-08-20 01:24:45 UTC) #20
liberato (no reviews please)
lgtm. https://codereview.chromium.org/2245333004/diff/100001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2245333004/diff/100001/media/gpu/android_video_decode_accelerator.cc#newcode241 media/gpu/android_video_decode_accelerator.cc:241: weak_this_factory_.InvalidateWeakPtrs(); i had no idea that one could ...
4 years, 4 months ago (2016-08-21 01:52:30 UTC) #21
watk
Thanks, I've tested this locally by PlatformThread::Sleep()ing on the AVDA thread, but it would be ...
4 years, 4 months ago (2016-08-22 18:20:34 UTC) #24
liberato (no reviews please)
On 2016/08/22 18:20:34, watk wrote: > Thanks, I've tested this locally by PlatformThread::Sleep()ing on the ...
4 years, 4 months ago (2016-08-22 19:49:07 UTC) #25
watk
On 2016/08/22 19:49:07, liberato wrote: > On 2016/08/22 18:20:34, watk wrote: > > Thanks, I've ...
4 years, 4 months ago (2016-08-22 20:16:35 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2245333004/120001
4 years, 4 months ago (2016-08-22 20:17:25 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years, 4 months ago (2016-08-22 20:45:50 UTC) #32
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 20:47:54 UTC) #34
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/d8e0dfd15ced352e5a4128553397609fb08f4c00
Cr-Commit-Position: refs/heads/master@{#413527}

Powered by Google App Engine
This is Rietveld 408576698