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

Issue 1424663003: Lock scheme #8: Introduced the new locking scheme (Closed)

Created:
5 years, 1 month ago by peah-webrtc
Modified:
5 years ago
CC:
webrtc-reviews_webrtc.org, Andrew MacDonald, tterriberry_mozilla.com, hlundin-webrtc, kwiberg-webrtc, the sun, aluebs-webrtc, bjornv1, ivoc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@add_threadcheckers_CL
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Introduced the new locking scheme BUG=webrtc:5099 Committed: https://crrev.com/df3efa8c079294857a8b8e0a02634d06a6d6b6d6 Cr-Commit-Position: refs/heads/master@{#10836}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Major general updates, completing the locking scheme, and increasing readability #

Total comments: 79

Patch Set 3 : Fixed build error caused by wrong usage of std::max #

Patch Set 4 : Changes according to latest reviewer comments #

Patch Set 5 : Fixed bug in one of the places where conditional locking is used #

Patch Set 6 : Corrected if statement that caused the APM to run in a single threaded manner when the AEC is on #

Patch Set 7 : Merge from master #

Patch Set 8 : Fixed a bad merge error for the beamformer settings and updated with the latest merge from master #

Total comments: 40

Patch Set 9 : Changes in response to reviewer comments #

Total comments: 6

Patch Set 10 : Changed comment typos #

Patch Set 11 : Merged changes from Lock scheme #9: WIP:Adding lock and thread annotations to the APM submodules in… #

Total comments: 13

Patch Set 12 : Moved struct forwards to AudioProcImpl, removed redundant forward, bundled the debug state variable… #

Total comments: 2

Patch Set 13 : Moved the debug state declaration to be a privately nested in AudioProcessingImpl #

Patch Set 14 : Activated the brief APM lock unittest, removed a stray empty line #

Patch Set 15 : Removed the call to num_reverse_channels in the lock test, changed to a mobile compatible AGC mode #

Patch Set 16 : Created a threadsafe wrapper for the random generator in the locktest. Fixed an unprotected variabl… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1310 lines, -842 lines) Patch
M webrtc/modules/audio_processing/audio_processing_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +233 lines, -123 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 33 chunks +580 lines, -422 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 chunks +73 lines, -53 lines 0 comments Download
M webrtc/modules/audio_processing/echo_cancellation_impl.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +26 lines, -18 lines 0 comments Download
M webrtc/modules/audio_processing/echo_cancellation_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 15 chunks +98 lines, -58 lines 0 comments Download
M webrtc/modules/audio_processing/echo_control_mobile_impl.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +22 lines, -10 lines 0 comments Download
M webrtc/modules/audio_processing/echo_control_mobile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +82 lines, -44 lines 0 comments Download
M webrtc/modules/audio_processing/gain_control_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +26 lines, -17 lines 0 comments Download
M webrtc/modules/audio_processing/gain_control_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +72 lines, -34 lines 0 comments Download
M webrtc/modules/audio_processing/high_pass_filter_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_processing/high_pass_filter_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +17 lines, -11 lines 0 comments Download
M webrtc/modules/audio_processing/level_estimator_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/level_estimator_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/noise_suppression_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -5 lines 0 comments Download
M webrtc/modules/audio_processing/noise_suppression_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +19 lines, -15 lines 0 comments Download
M webrtc/modules/audio_processing/voice_detection_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -8 lines 0 comments Download
M webrtc/modules/audio_processing/voice_detection_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +26 lines, -13 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 46 (13 generated)
peah-webrtc
5 years, 1 month ago (2015-10-26 09:29:54 UTC) #2
kwiberg-webrtc
A bunch of the classes don't have lock annotations on their variables. Why? https://codereview.webrtc.org/1424663003/diff/1/webrtc/modules/audio_processing/audio_processing_impl.cc File ...
5 years, 1 month ago (2015-10-27 13:15:57 UTC) #4
peah-webrtc
On 2015/10/27 13:15:57, kwiberg-webrtc wrote: > A bunch of the classes don't have lock annotations ...
5 years, 1 month ago (2015-11-05 10:37:48 UTC) #5
peah-webrtc
This CL is now again in the desired shape. Please review at will. https://codereview.webrtc.org/1424663003/diff/1/webrtc/modules/audio_processing/audio_processing_impl.cc File ...
5 years, 1 month ago (2015-11-05 11:47:58 UTC) #6
hlundin-webrtc
Good. But please see comments. https://codereview.webrtc.org/1424663003/diff/20001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/20001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode242 webrtc/modules/audio_processing/audio_processing_impl.cc:242: rtc::CritScope cs_render(&crit_render_); Can you ...
5 years, 1 month ago (2015-11-05 16:11:23 UTC) #7
peah-webrtc
https://codereview.webrtc.org/1424663003/diff/20001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/20001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode242 webrtc/modules/audio_processing/audio_processing_impl.cc:242: rtc::CritScope cs_render(&crit_render_); On 2015/11/05 16:11:21, hlundin-webrtc wrote: > Can ...
5 years, 1 month ago (2015-11-06 09:54:33 UTC) #8
peah-webrtc
I needed to do an update to fix an issue with one of the conditional ...
5 years, 1 month ago (2015-11-11 08:44:13 UTC) #9
peah-webrtc
5 years, 1 month ago (2015-11-11 08:44:57 UTC) #11
hlundin-webrtc
lgtm https://codereview.webrtc.org/1424663003/diff/20001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/20001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode242 webrtc/modules/audio_processing/audio_processing_impl.cc:242: rtc::CritScope cs_render(&crit_render_); On 2015/11/06 09:54:31, peah-webrtc wrote: > ...
5 years, 1 month ago (2015-11-20 10:36:30 UTC) #12
the sun
I've added a few comments in echo_cancellation_impl.*; the patterns repeat in the other modules, so ...
5 years ago (2015-11-23 21:36:05 UTC) #13
kwiberg-webrtc
I have some specific comments below, but the main problem is that with the sort ...
5 years ago (2015-11-23 22:15:11 UTC) #14
peah-webrtc
https://codereview.webrtc.org/1424663003/diff/140001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/140001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode87 webrtc/modules/audio_processing/audio_processing_impl.cc:87: voice_detection(NULL) {} On 2015/11/23 22:15:10, kwiberg-webrtc wrote: > nullptr ...
5 years ago (2015-11-24 21:42:24 UTC) #15
kwiberg-webrtc
The replacement of the trylock thingies with recursive use of the locks looks good. https://codereview.webrtc.org/1424663003/diff/140001/webrtc/modules/audio_processing/audio_processing_impl.cc ...
5 years ago (2015-11-25 10:17:14 UTC) #16
peah-webrtc
https://codereview.webrtc.org/1424663003/diff/160001/webrtc/modules/audio_processing/echo_cancellation_impl.cc File webrtc/modules/audio_processing/echo_cancellation_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/160001/webrtc/modules/audio_processing/echo_cancellation_impl.cc#newcode336 webrtc/modules/audio_processing/echo_cancellation_impl.cc:336: // reentrant. On 2015/11/25 10:17:14, kwiberg-webrtc wrote: > possibly ...
5 years ago (2015-11-25 12:33:53 UTC) #17
kwiberg-webrtc
lgtm, provided that you also land "Lock scheme #9", which fixes complains I had about ...
5 years ago (2015-11-26 21:34:50 UTC) #18
the sun
https://codereview.webrtc.org/1424663003/diff/200001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/200001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode276 webrtc/modules/audio_processing/audio_processing_impl.cc:276: AudioProcessingImpl::~AudioProcessingImpl() { CS not needed here anymore? https://codereview.webrtc.org/1424663003/diff/200001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode442 webrtc/modules/audio_processing/audio_processing_impl.cc:442: ...
5 years ago (2015-11-27 12:25:53 UTC) #19
peah-webrtc
https://codereview.webrtc.org/1424663003/diff/200001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/200001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode276 webrtc/modules/audio_processing/audio_processing_impl.cc:276: AudioProcessingImpl::~AudioProcessingImpl() { On 2015/11/27 12:25:52, the sun wrote: > ...
5 years ago (2015-11-27 12:57:52 UTC) #20
peah-webrtc
Added updates according to reviewer comments: -Moved struct forwards to AudioProcImpl -Removed redundant forward -Bundled ...
5 years ago (2015-11-27 12:59:26 UTC) #21
the sun
LGTM, with disclaimer: It is impossible to reason about the validity of the locking scheme ...
5 years ago (2015-11-27 13:32:28 UTC) #22
peah-webrtc
On 2015/11/26 21:34:50, kwiberg-webrtc wrote: > lgtm, provided that you also land "Lock scheme #9", ...
5 years ago (2015-11-27 13:48:55 UTC) #23
peah-webrtc
On 2015/11/27 13:32:28, the sun wrote: > LGTM, with disclaimer: > > It is impossible ...
5 years ago (2015-11-27 13:50:17 UTC) #24
peah-webrtc
https://codereview.webrtc.org/1424663003/diff/200001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/1424663003/diff/200001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode276 webrtc/modules/audio_processing/audio_processing_impl.cc:276: AudioProcessingImpl::~AudioProcessingImpl() { On 2015/11/27 13:32:28, the sun wrote: > ...
5 years ago (2015-11-27 13:50:22 UTC) #25
peah-webrtc
Thanks everyone the an enormous effort you have put into the reviewing of this CL, ...
5 years ago (2015-11-27 13:52:12 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424663003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424663003/260001
5 years ago (2015-11-27 14:13:23 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_tsan2 on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_tsan2/builds/8315)
5 years ago (2015-11-27 14:33:04 UTC) #30
peah-webrtc
Updated the lock test that fails for the CL -Changed AGC mode as the previous ...
5 years ago (2015-11-27 19:44:03 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424663003/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424663003/280001
5 years ago (2015-11-27 19:44:53 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_tsan2 on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_tsan2/builds/8325)
5 years ago (2015-11-27 20:28:05 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424663003/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424663003/300001
5 years ago (2015-11-27 22:09:26 UTC) #37
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-11-28 00:04:45 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424663003/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424663003/300001
5 years ago (2015-11-28 20:31:36 UTC) #42
commit-bot: I haz the power
Committed patchset #16 (id:300001)
5 years ago (2015-11-28 20:35:19 UTC) #44
commit-bot: I haz the power
5 years ago (2015-11-28 20:35:24 UTC) #46
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/df3efa8c079294857a8b8e0a02634d06a6d6b6d6
Cr-Commit-Position: refs/heads/master@{#10836}

Powered by Google App Engine
This is Rietveld 408576698