• yurys@chromium.org's avatar
    Fix data race in SamplingCircularQueue · 97681be4
    yurys@chromium.org authored
    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
    
    Review URL: https://codereview.chromium.org/19642002
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    97681be4
circular-queue-inl.h 2.45 KB