Index: src/circular-queue-inl.h |
diff --git a/src/circular-queue-inl.h b/src/circular-queue-inl.h |
index ffe8fb003eaa1addf4292d427a3a25f6a5642b56..962b069fb0fb481b7d1394ffc9e473299641e136 100644 |
--- a/src/circular-queue-inl.h |
+++ b/src/circular-queue-inl.h |
@@ -82,11 +82,10 @@ Record* CircularQueue<Record>::Next(Record* curr) { |
void* SamplingCircularQueue::Enqueue() { |
- Cell* enqueue_pos = reinterpret_cast<Cell*>( |
- Thread::GetThreadLocal(producer_key_)); |
- WrapPositionIfNeeded(&enqueue_pos); |
- Thread::SetThreadLocal(producer_key_, enqueue_pos + record_size_); |
- return enqueue_pos; |
+ WrapPositionIfNeeded(&producer_pos_->enqueue_pos); |
+ void* result = producer_pos_->enqueue_pos; |
+ producer_pos_->enqueue_pos += record_size_; |
+ return result; |
} |