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

Side by Side Diff: src/heap/store-buffer.cc

Issue 2696563003: [heap] Ensure consistency between store buffer mode and moving all entries to remembered set. (Closed)
Patch Set: rename Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/store-buffer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/store-buffer.h" 5 #include "src/heap/store-buffer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/counters.h" 9 #include "src/counters.h"
10 #include "src/heap/incremental-marking.h" 10 #include "src/heap/incremental-marking.h"
11 #include "src/isolate.h" 11 #include "src/isolate.h"
12 #include "src/objects-inl.h" 12 #include "src/objects-inl.h"
13 #include "src/v8.h" 13 #include "src/v8.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 StoreBuffer::StoreBuffer(Heap* heap) 18 StoreBuffer::StoreBuffer(Heap* heap)
19 : heap_(heap), top_(nullptr), current_(0), virtual_memory_(nullptr) { 19 : heap_(heap),
20 top_(nullptr),
21 current_(0),
22 mode_(NOT_IN_GC),
23 virtual_memory_(nullptr) {
20 for (int i = 0; i < kStoreBuffers; i++) { 24 for (int i = 0; i < kStoreBuffers; i++) {
21 start_[i] = nullptr; 25 start_[i] = nullptr;
22 limit_[i] = nullptr; 26 limit_[i] = nullptr;
23 lazy_top_[i] = nullptr; 27 lazy_top_[i] = nullptr;
24 } 28 }
25 task_running_ = false; 29 task_running_ = false;
26 insertion_callback = &InsertDuringRuntime; 30 insertion_callback = &InsertDuringRuntime;
27 deletion_callback = &DeleteDuringRuntime; 31 deletion_callback = &DeleteDuringRuntime;
28 } 32 }
29 33
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 141
138 void StoreBuffer::ConcurrentlyProcessStoreBuffer() { 142 void StoreBuffer::ConcurrentlyProcessStoreBuffer() {
139 base::LockGuard<base::Mutex> guard(&mutex_); 143 base::LockGuard<base::Mutex> guard(&mutex_);
140 int other = (current_ + 1) % kStoreBuffers; 144 int other = (current_ + 1) % kStoreBuffers;
141 MoveEntriesToRememberedSet(other); 145 MoveEntriesToRememberedSet(other);
142 task_running_ = false; 146 task_running_ = false;
143 } 147 }
144 148
145 } // namespace internal 149 } // namespace internal
146 } // namespace v8 150 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/store-buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698