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

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

Issue 1675163003: Filter out invalid slots in store buffer eagerly during object transition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable WriteBarrierObjectShiftFieldsRight test and add comments Created 4 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/heap.cc ('k') | src/heap/store-buffer.cc » ('j') | 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 #ifndef V8_STORE_BUFFER_H_ 5 #ifndef V8_STORE_BUFFER_H_
6 #define V8_STORE_BUFFER_H_ 6 #define V8_STORE_BUFFER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/logging.h" 9 #include "src/base/logging.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 18 matching lines...) Expand all
29 void SetUp(); 29 void SetUp();
30 void TearDown(); 30 void TearDown();
31 31
32 static const int kStoreBufferOverflowBit = 1 << (14 + kPointerSizeLog2); 32 static const int kStoreBufferOverflowBit = 1 << (14 + kPointerSizeLog2);
33 static const int kStoreBufferSize = kStoreBufferOverflowBit; 33 static const int kStoreBufferSize = kStoreBufferOverflowBit;
34 static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address); 34 static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address);
35 35
36 // This is used to add addresses to the store buffer non-concurrently. 36 // This is used to add addresses to the store buffer non-concurrently.
37 inline void Mark(Address addr); 37 inline void Mark(Address addr);
38 38
39 // Removes the given slot from the store buffer non-concurrently. If the
40 // slot was never added to the store buffer, then the function does nothing.
41 void Remove(Address addr);
42
39 // Slots that do not point to the ToSpace after callback invocation will be 43 // Slots that do not point to the ToSpace after callback invocation will be
40 // removed from the set. 44 // removed from the set.
41 void IteratePointersToNewSpace(ObjectSlotCallback callback); 45 void IteratePointersToNewSpace(ObjectSlotCallback callback);
42 46
43 void Verify(); 47 void Verify();
44 48
45 // Eliminates all stale store buffer entries from the store buffer, i.e., 49 // Eliminates all stale store buffer entries from the store buffer, i.e.,
46 // slots that are not part of live objects anymore. This method must be 50 // slots that are not part of live objects anymore. This method must be
47 // called after marking, when the whole transitive closure is known and 51 // called after marking, when the whole transitive closure is known and
48 // must be called before sweeping when mark bits are still intact. 52 // must be called before sweeping when mark bits are still intact.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 int count; 109 int count;
106 }; 110 };
107 111
108 Node* top_; 112 Node* top_;
109 }; 113 };
110 114
111 } // namespace internal 115 } // namespace internal
112 } // namespace v8 116 } // namespace v8
113 117
114 #endif // V8_STORE_BUFFER_H_ 118 #endif // V8_STORE_BUFFER_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698