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

Issue 2720223003: Add a DCHECK for PlatformThread instances that are too busy. (Closed)

Created:
3 years, 9 months ago by tommi
Modified:
3 years, 9 months ago
Reviewers:
the sun
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add a DCHECK for PlatformThread instances that are too busy. This adds a simple mechanism that provides protection against implementations that use the legacy callback type in PlatformThread and are prone to entering a busy loop. Enabled only in DCHECK enabled builds. BUG=webrtc:7187 Review-Url: https://codereview.webrtc.org/2720223003 Cr-Commit-Position: refs/heads/master@{#16973} Committed: https://chromium.googlesource.com/external/webrtc/+/500f1b7a324c04d8920a32e29d01aaf87035034c

Patch Set 1 #

Total comments: 7

Patch Set 2 : Use nanosleep with ubsan #

Patch Set 3 : Increase sleep time in test callback to make sure we don't falsely trigger the busy loop detector #

Patch Set 4 : Don't use sched_yield on android #

Patch Set 5 : remove valgrind checks #

Patch Set 6 : Format #

Patch Set 7 : Add comment #

Total comments: 2

Patch Set 8 : Add comment for test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -7 lines) Patch
M webrtc/base/platform_thread.cc View 1 2 3 4 5 6 2 chunks +35 lines, -6 lines 0 comments Download
M webrtc/base/platform_thread_unittest.cc View 1 2 3 4 5 6 7 2 chunks +18 lines, -1 line 0 comments Download

Messages

Total messages: 49 (30 generated)
tommi
wdyt?
3 years, 9 months ago (2017-02-28 17:08:20 UTC) #2
tommi
Use nanosleep with ubsan
3 years, 9 months ago (2017-03-01 01:02:46 UTC) #7
tommi
Increase sleep time in test callback to make sure we don't falsely trigger the busy ...
3 years, 9 months ago (2017-03-01 10:00:30 UTC) #12
tommi
Don't use sched_yield on android
3 years, 9 months ago (2017-03-01 14:34:02 UTC) #17
tommi
valgrind
3 years, 9 months ago (2017-03-01 14:41:08 UTC) #18
tommi
valgrind2
3 years, 9 months ago (2017-03-01 14:57:16 UTC) #19
tommi
valgrind3
3 years, 9 months ago (2017-03-01 15:04:11 UTC) #20
tommi
remove valgrind checks
3 years, 9 months ago (2017-03-01 16:03:01 UTC) #21
tommi
Remove unnecessary include
3 years, 9 months ago (2017-03-01 16:05:35 UTC) #27
tommi
Format
3 years, 9 months ago (2017-03-01 16:06:26 UTC) #28
tommi
On 2017/03/01 16:06:26, tommi (webrtc) wrote: > Format Fredrik - wdyt? Should we land this ...
3 years, 9 months ago (2017-03-01 19:48:50 UTC) #30
the sun
https://codereview.webrtc.org/2720223003/diff/1/webrtc/base/platform_thread.cc File webrtc/base/platform_thread.cc (right): https://codereview.webrtc.org/2720223003/diff/1/webrtc/base/platform_thread.cc#newcode13 webrtc/base/platform_thread.cc:13: #include <inttypes.h> stdint.h https://codereview.webrtc.org/2720223003/diff/1/webrtc/base/platform_thread.cc#newcode241 webrtc/base/platform_thread.cc:241: #if RTC_DCHECK_IS_ON A comment ...
3 years, 9 months ago (2017-03-01 23:31:36 UTC) #35
tommi
Add comment
3 years, 9 months ago (2017-03-02 14:11:53 UTC) #36
tommi
https://codereview.webrtc.org/2720223003/diff/1/webrtc/base/platform_thread.cc File webrtc/base/platform_thread.cc (right): https://codereview.webrtc.org/2720223003/diff/1/webrtc/base/platform_thread.cc#newcode13 webrtc/base/platform_thread.cc:13: #include <inttypes.h> On 2017/03/01 23:31:36, the sun wrote: > ...
3 years, 9 months ago (2017-03-02 14:11:59 UTC) #37
the sun
lgtm https://codereview.webrtc.org/2720223003/diff/1/webrtc/base/platform_thread.cc File webrtc/base/platform_thread.cc (right): https://codereview.webrtc.org/2720223003/diff/1/webrtc/base/platform_thread.cc#newcode246 webrtc/base/platform_thread.cc:246: auto diff = loop_stamps[id] - loop_stamps[compare_id]; On 2017/03/02 ...
3 years, 9 months ago (2017-03-02 14:20:09 UTC) #40
tommi
Add comment for test
3 years, 9 months ago (2017-03-02 14:33:16 UTC) #41
tommi
https://codereview.webrtc.org/2720223003/diff/200001/webrtc/base/platform_thread_unittest.cc File webrtc/base/platform_thread_unittest.cc (right): https://codereview.webrtc.org/2720223003/diff/200001/webrtc/base/platform_thread_unittest.cc#newcode116 webrtc/base/platform_thread_unittest.cc:116: TEST(PlatformThreadTest, DISABLED_TooBusyDeprecated) { On 2017/03/02 14:20:09, the sun wrote: ...
3 years, 9 months ago (2017-03-02 14:34:55 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2720223003/220001
3 years, 9 months ago (2017-03-02 14:35:24 UTC) #45
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 15:07:13 UTC) #49
Message was sent while issue was closed.
Committed patchset #8 (id:220001) as
https://chromium.googlesource.com/external/webrtc/+/500f1b7a324c04d8920a32e29...

Powered by Google App Engine
This is Rietveld 408576698