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

Issue 19642002: Fix data race in SamplingCircularQueue (Closed)

Created:
7 years, 5 months ago by yurys
Modified:
7 years, 5 months ago
CC:
v8-dev, alph
Visibility:
Public.

Description

Fix data race in SamplingCircularQueue This change fixes data race described in the bug by adding Acquire_Load to SamplingCircularQueue::StartDequeue and Acquire_Store to SamplingCircularQueue::Enqueue. Also the queue implementation imposed a constraint on the records it stored: the first AtomicWord in each record was a marker. For that purpose TickSampleEventRecord had filter field of type int. This approach is error prone, e.g. on x64 sizeof(AtomicWord) is 8 while sizeof(int) is 4. Moreover the queue needs such marker only at the beginning of chunk. I changed the queue so that it stores the marker explicitly as the first Cell in chunk and removed the filter field. BUG=251218 R=loislo@chromium.org, yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=15750

Patch Set 1 #

Patch Set 2 : Removed some empty lines #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -40 lines) Patch
M src/circular-queue.h View 1 3 chunks +10 lines, -7 lines 0 comments Download
M src/circular-queue.cc View 1 4 chunks +19 lines, -16 lines 0 comments Download
M src/circular-queue-inl.h View 2 chunks +11 lines, -2 lines 0 comments Download
M src/cpu-profiler.h View 1 chunk +1 line, -11 lines 0 comments Download
M test/cctest/test-circular-queue.cc View 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
yurys
7 years, 5 months ago (2013-07-17 17:23:31 UTC) #1
loislo
LGTM This approach looks simpler than the previous but still complicated. I'd say that we ...
7 years, 5 months ago (2013-07-18 12:28:42 UTC) #2
yurys
On 2013/07/18 12:28:42, loislo wrote: > LGTM > > This approach looks simpler than the ...
7 years, 5 months ago (2013-07-18 12:56:32 UTC) #3
yurys
Yang or Jakob, can you do OWNER review please?
7 years, 5 months ago (2013-07-18 12:57:10 UTC) #4
Yang
On 2013/07/18 12:57:10, Yury Semikhatsky wrote: > Yang or Jakob, can you do OWNER review ...
7 years, 5 months ago (2013-07-18 13:12:54 UTC) #5
yurys
7 years, 5 months ago (2013-07-18 13:42:13 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r15750 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698