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

Issue 2286343002: Less lock acquisitions for AudioMixer. (Closed)

Created:
4 years, 3 months ago by aleloi
Modified:
4 years, 3 months ago
Reviewers:
ivoc, kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, yujie_mao (webrtc), Andrew MacDonald, henrika_webrtc, hlundin-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, qiang.lu, niklas.enbom, peah-webrtc, minyue-webrtc, the sun, aluebs-webrtc, bjornv1
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Several lock acquisitions and one of the two lock members are removed. ENSURE_LOCKS_REQUIRED and CalledOnValidThread annotations are added. NOTRY=True Committed: https://crrev.com/311525e71559227e0cc762236450cd0cbdbde636 Cr-Commit-Position: refs/heads/master@{#14106}

Patch Set 1 : A huge pile of messy changes (left because of the comments) #

Total comments: 25

Patch Set 2 #

Total comments: 9

Patch Set 3 : Changes in response to reviewer comments. #

Total comments: 9

Patch Set 4 : GUARDED_BY, ACCESS_ON, C header and EXPECT_EQ order. #

Total comments: 5

Patch Set 5 : Added ACCESS_ON to limiter and added threading unit test. #

Total comments: 1

Patch Set 6 : Construction and initialization. #

Total comments: 6

Patch Set 7 : Removed 'explicit' and changed lock type. #

Patch Set 8 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -113 lines) Patch
M webrtc/modules/audio_mixer/audio_mixer_impl.h View 1 2 3 4 5 6 5 chunks +18 lines, -18 lines 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl.cc View 1 2 3 4 5 6 13 chunks +64 lines, -93 lines 0 comments Download
M webrtc/modules/audio_mixer/test/audio_mixer_unittest.cc View 1 2 3 4 4 chunks +93 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 59 (29 generated)
aleloi
https://codereview.webrtc.org/2286343002/diff/20001/webrtc/BUILD.gn File webrtc/BUILD.gn (right): https://codereview.webrtc.org/2286343002/diff/20001/webrtc/BUILD.gn#newcode357 webrtc/BUILD.gn:357: source_set("config_options") { New target for common.h / common.cc. I ...
4 years, 3 months ago (2016-08-29 15:34:43 UTC) #4
kjellander_webrtc
I'm afraid kwiberg beat you to the party here with his https://codereview.webrtc.org/2288593004/ + a series ...
4 years, 3 months ago (2016-08-29 19:24:08 UTC) #6
kwiberg-webrtc
On 2016/08/29 19:24:08, kjellander_webrtc wrote: > I'm afraid kwiberg beat you to the party here ...
4 years, 3 months ago (2016-08-29 21:05:01 UTC) #7
aleloi
On 2016/08/29 21:05:01, kwiberg-webrtc wrote: > On 2016/08/29 19:24:08, kjellander_webrtc wrote: > > I'm afraid ...
4 years, 3 months ago (2016-08-30 08:08:18 UTC) #8
aleloi
Hi! Could you take a look at this? It's more mixer improvements. It's a bit ...
4 years, 3 months ago (2016-08-30 15:13:34 UTC) #19
kwiberg-webrtc
It could just be me, but I find this CL hard to follow. It's large, ...
4 years, 3 months ago (2016-08-30 16:29:45 UTC) #20
aleloi
I removed everything except the lock and threading parts. The other changes are more simple ...
4 years, 3 months ago (2016-08-31 08:44:23 UTC) #22
kwiberg-webrtc
Good! Now it's *much* easier to read. https://codereview.webrtc.org/2286343002/diff/160001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (left): https://codereview.webrtc.org/2286343002/diff/160001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#oldcode245 webrtc/modules/audio_mixer/audio_mixer_impl.cc:245: MixAnonomouslyFromList(audio_frame_for_mixing, additionalFramesList); ...
4 years, 3 months ago (2016-08-31 09:10:36 UTC) #23
ivoc
https://codereview.webrtc.org/2286343002/diff/160001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2286343002/diff/160001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode191 webrtc/modules/audio_mixer/audio_mixer_impl.cc:191: switch (sample_rate) { It's not really related to the ...
4 years, 3 months ago (2016-08-31 09:22:46 UTC) #24
aleloi
Please take another look! https://codereview.webrtc.org/2286343002/diff/160001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (left): https://codereview.webrtc.org/2286343002/diff/160001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#oldcode245 webrtc/modules/audio_mixer/audio_mixer_impl.cc:245: MixAnonomouslyFromList(audio_frame_for_mixing, additionalFramesList); On 2016/08/31 09:10:36, ...
4 years, 3 months ago (2016-08-31 11:03:11 UTC) #25
aleloi
https://codereview.webrtc.org/2286343002/diff/180001/webrtc/modules/audio_mixer/test/audio_mixer_unittest.cc File webrtc/modules/audio_mixer/test/audio_mixer_unittest.cc (right): https://codereview.webrtc.org/2286343002/diff/180001/webrtc/modules/audio_mixer/test/audio_mixer_unittest.cc#newcode235 webrtc/modules/audio_mixer/test/audio_mixer_unittest.cc:235: TEST(AudioMixer, FrameNotModifiedForSingleAnonymousParticipant) { This test compares mixer output in ...
4 years, 3 months ago (2016-08-31 11:07:46 UTC) #26
ivoc
https://codereview.webrtc.org/2286343002/diff/180001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2286343002/diff/180001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode136 webrtc/modules/audio_mixer/audio_mixer_impl.h:136: std::unique_ptr<CriticalSectionWrapper> crit_; Please also add GUARDED_BY(crit_) to any members ...
4 years, 3 months ago (2016-08-31 14:34:25 UTC) #27
aleloi
Updated in response to comments. https://codereview.webrtc.org/2286343002/diff/180001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2286343002/diff/180001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode136 webrtc/modules/audio_mixer/audio_mixer_impl.h:136: std::unique_ptr<CriticalSectionWrapper> crit_; On 2016/08/31 ...
4 years, 3 months ago (2016-08-31 15:16:22 UTC) #28
kwiberg-webrtc
https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode150 webrtc/modules/audio_mixer/audio_mixer_impl.h:150: size_t num_mixed_audio_sources_ GUARDED_BY(crit_); Good, but it makes me very ...
4 years, 3 months ago (2016-09-01 11:19:01 UTC) #29
aleloi
https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode150 webrtc/modules/audio_mixer/audio_mixer_impl.h:150: size_t num_mixed_audio_sources_ GUARDED_BY(crit_); On 2016/09/01 11:19:00, kwiberg-webrtc wrote: > ...
4 years, 3 months ago (2016-09-01 11:24:39 UTC) #30
kwiberg-webrtc
https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode150 webrtc/modules/audio_mixer/audio_mixer_impl.h:150: size_t num_mixed_audio_sources_ GUARDED_BY(crit_); On 2016/09/01 11:24:39, aleloi wrote: > ...
4 years, 3 months ago (2016-09-01 11:32:28 UTC) #31
aleloi
https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode150 webrtc/modules/audio_mixer/audio_mixer_impl.h:150: size_t num_mixed_audio_sources_ GUARDED_BY(crit_); On 2016/09/01 11:32:28, kwiberg-webrtc wrote: > ...
4 years, 3 months ago (2016-09-01 12:33:06 UTC) #32
aleloi
On 2016/09/01 12:33:06, aleloi wrote: > https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h > File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): > > https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode150 > ...
4 years, 3 months ago (2016-09-02 07:45:33 UTC) #37
kwiberg-webrtc
https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode150 webrtc/modules/audio_mixer/audio_mixer_impl.h:150: size_t num_mixed_audio_sources_ GUARDED_BY(crit_); On 2016/09/01 12:33:06, aleloi wrote: > ...
4 years, 3 months ago (2016-09-02 07:45:45 UTC) #38
aleloi
On 2016/09/02 07:45:45, kwiberg-webrtc wrote: > https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h > File webrtc/modules/audio_mixer/audio_mixer_impl.h (right): > > https://codereview.webrtc.org/2286343002/diff/200001/webrtc/modules/audio_mixer/audio_mixer_impl.h#newcode150 > ...
4 years, 3 months ago (2016-09-02 08:36:56 UTC) #39
aleloi
https://codereview.webrtc.org/2286343002/diff/240001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2286343002/diff/240001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode150 webrtc/modules/audio_mixer/audio_mixer_impl.cc:150: return false; This can't fail and is set in ...
4 years, 3 months ago (2016-09-02 08:51:21 UTC) #41
kwiberg-webrtc
lgtm, but see nits Good job getting all the members annotated! https://codereview.webrtc.org/2286343002/diff/280001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): ...
4 years, 3 months ago (2016-09-02 09:00:26 UTC) #42
aleloi
https://codereview.webrtc.org/2286343002/diff/280001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2286343002/diff/280001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode129 webrtc/modules/audio_mixer/audio_mixer_impl.cc:129: : crit_(new CriticalSectionWrapper()), On 2016/09/02 09:00:26, kwiberg-webrtc wrote: > ...
4 years, 3 months ago (2016-09-02 09:27:28 UTC) #43
kwiberg-webrtc
https://codereview.webrtc.org/2286343002/diff/280001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2286343002/diff/280001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode129 webrtc/modules/audio_mixer/audio_mixer_impl.cc:129: : crit_(new CriticalSectionWrapper()), On 2016/09/02 09:27:28, aleloi wrote: > ...
4 years, 3 months ago (2016-09-02 09:44:00 UTC) #44
ivoc
LGTM.
4 years, 3 months ago (2016-09-07 11:53:59 UTC) #47
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/2286343002/340001
4 years, 3 months ago (2016-09-07 11:58:13 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: android_rel on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_rel/builds/16288)
4 years, 3 months ago (2016-09-07 12:09:26 UTC) #52
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/2286343002/340001
4 years, 3 months ago (2016-09-07 13:01:03 UTC) #55
commit-bot: I haz the power
Committed patchset #8 (id:340001)
4 years, 3 months ago (2016-09-07 13:13:16 UTC) #57
commit-bot: I haz the power
4 years, 3 months ago (2016-09-07 13:13:26 UTC) #59
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/311525e71559227e0cc762236450cd0cbdbde636
Cr-Commit-Position: refs/heads/master@{#14106}

Powered by Google App Engine
This is Rietveld 408576698