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

Issue 116983004: Change some operations touching counts_[] to be atomic. (Closed)

Created:
7 years ago by Alexander Potapenko
Modified:
6 years, 11 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org
Visibility:
Public.

Description

Change the operations touching counts_[] and redundant_count_ to be atomic. This will make it explicit that the counters are accessed without synchronization and will also suppress TSan v2 warnings. BUG=46840 R=jar@chromium.org,kaiwang@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245997

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -18 lines) Patch
M base/metrics/histogram_base.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M base/metrics/histogram_samples.h View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M base/metrics/histogram_samples.cc View 1 2 3 4 chunks +16 lines, -6 lines 0 comments Download
M base/metrics/sample_vector.h View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M base/metrics/sample_vector.cc View 1 2 3 4 chunks +9 lines, -6 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Alexander Potapenko
Please take a look.
7 years ago (2013-12-18 10:56:33 UTC) #1
jar (doing other things)
Q: I thought you needed to declare things atomic in order to use these atomic ...
7 years ago (2013-12-18 17:19:07 UTC) #2
Alexander Potapenko
You're right, I should have ensured all the accesses to atomic vars are indeed atomic. ...
7 years ago (2013-12-18 19:04:10 UTC) #3
Alexander Potapenko
Sorry for not getting back to this for a while. On 2013/12/18 17:19:07, jar wrote: ...
6 years, 12 months ago (2013-12-24 11:04:20 UTC) #4
jar (doing other things)
https://codereview.chromium.org/116983004/diff/40001/base/metrics/histogram_samples.cc File base/metrics/histogram_samples.cc (right): https://codereview.chromium.org/116983004/diff/40001/base/metrics/histogram_samples.cc#newcode67 base/metrics/histogram_samples.cc:67: HistogramBase::Count old_redundant_count = <sigh>... this is also seemingly atomic... ...
6 years, 12 months ago (2013-12-24 18:00:54 UTC) #5
Alexander Potapenko
https://codereview.chromium.org/116983004/diff/40001/base/metrics/histogram_samples.cc File base/metrics/histogram_samples.cc (right): https://codereview.chromium.org/116983004/diff/40001/base/metrics/histogram_samples.cc#newcode67 base/metrics/histogram_samples.cc:67: HistogramBase::Count old_redundant_count = On 2013/12/24 18:00:55, jar (OOO till ...
6 years, 12 months ago (2013-12-25 09:08:30 UTC) #6
jar (doing other things)
https://codereview.chromium.org/116983004/diff/40001/base/metrics/histogram_samples.cc File base/metrics/histogram_samples.cc (right): https://codereview.chromium.org/116983004/diff/40001/base/metrics/histogram_samples.cc#newcode67 base/metrics/histogram_samples.cc:67: HistogramBase::Count old_redundant_count = On 2013/12/25 09:08:31, Alexander Potapenko wrote: ...
6 years, 12 months ago (2013-12-25 20:12:01 UTC) #7
Alexander Potapenko
Fixed. This CL isn't really urgent, so please enjoy your vacation. https://codereview.chromium.org/116983004/diff/40001/base/metrics/histogram_samples.cc File base/metrics/histogram_samples.cc (right): ...
6 years, 12 months ago (2013-12-26 09:26:10 UTC) #8
Alexander Potapenko
Jim, can you please take another look? Thanks. On 2013/12/26 09:26:10, Alexander Potapenko wrote: > ...
6 years, 11 months ago (2014-01-13 10:37:11 UTC) #9
Alexander Potapenko
Ping?
6 years, 11 months ago (2014-01-20 07:25:26 UTC) #10
jar (doing other things)
LGTM Hopefully there are enough unit tests that there are no subtle typos that were ...
6 years, 11 months ago (2014-01-20 18:33:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/glider@chromium.org/116983004/330001
6 years, 11 months ago (2014-01-21 06:31:47 UTC) #12
commit-bot: I haz the power
6 years, 11 months ago (2014-01-21 07:59:31 UTC) #13
Message was sent while issue was closed.
Change committed as 245997

Powered by Google App Engine
This is Rietveld 408576698