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

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

Issue 1009323002: Delete dead store buffer verification code and code that changes the store buffer in debug mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 Object*** Top() { return reinterpret_cast<Object***>(old_top_); } 76 Object*** Top() { return reinterpret_cast<Object***>(old_top_); }
77 void SetTop(Object*** top) { 77 void SetTop(Object*** top) {
78 DCHECK(top >= Start()); 78 DCHECK(top >= Start());
79 DCHECK(top <= Limit()); 79 DCHECK(top <= Limit());
80 old_top_ = reinterpret_cast<Address*>(top); 80 old_top_ = reinterpret_cast<Address*>(top);
81 } 81 }
82 82
83 bool old_buffer_is_sorted() { return old_buffer_is_sorted_; } 83 bool old_buffer_is_sorted() { return old_buffer_is_sorted_; }
84 bool old_buffer_is_filtered() { return old_buffer_is_filtered_; } 84 bool old_buffer_is_filtered() { return old_buffer_is_filtered_; }
85 85
86 // Goes through the store buffer removing pointers to things that have
87 // been promoted. Rebuilds the store buffer completely if it overflowed.
88 void SortUniq();
89
90 void EnsureSpace(intptr_t space_needed); 86 void EnsureSpace(intptr_t space_needed);
91 void Verify(); 87 void Verify();
92 88
93 bool PrepareForIteration(); 89 bool PrepareForIteration();
94 90
95 #ifdef DEBUG
96 void Clean();
97 // Slow, for asserts only.
98 bool CellIsInStoreBuffer(Address cell);
99 #endif
100
101 void Filter(int flag); 91 void Filter(int flag);
102 92
103 // Eliminates all stale store buffer entries from the store buffer, i.e., 93 // Eliminates all stale store buffer entries from the store buffer, i.e.,
104 // slots that are not part of live objects anymore. This method must be 94 // slots that are not part of live objects anymore. This method must be
105 // called after marking, when the whole transitive closure is known and 95 // called after marking, when the whole transitive closure is known and
106 // must be called before sweeping when mark bits are still intact. 96 // must be called before sweeping when mark bits are still intact.
107 void ClearInvalidStoreBufferEntries(); 97 void ClearInvalidStoreBufferEntries();
108 void VerifyValidStoreBufferEntries(); 98 void VerifyValidStoreBufferEntries();
109 99
110 private: 100 private:
(...skipping 26 matching lines...) Expand all
137 // Two hash sets used for filtering. 127 // Two hash sets used for filtering.
138 // If address is in the hash set then it is guaranteed to be in the 128 // If address is in the hash set then it is guaranteed to be in the
139 // old part of the store buffer. 129 // old part of the store buffer.
140 uintptr_t* hash_set_1_; 130 uintptr_t* hash_set_1_;
141 uintptr_t* hash_set_2_; 131 uintptr_t* hash_set_2_;
142 bool hash_sets_are_empty_; 132 bool hash_sets_are_empty_;
143 133
144 void ClearFilteringHashSets(); 134 void ClearFilteringHashSets();
145 135
146 bool SpaceAvailable(intptr_t space_needed); 136 bool SpaceAvailable(intptr_t space_needed);
147 void Uniq();
148 void ExemptPopularPages(int prime_sample_step, int threshold); 137 void ExemptPopularPages(int prime_sample_step, int threshold);
149 138
150 void ProcessOldToNewSlot(Address slot_address, 139 void ProcessOldToNewSlot(Address slot_address,
151 ObjectSlotCallback slot_callback); 140 ObjectSlotCallback slot_callback);
152 141
153 void FindPointersToNewSpaceInRegion(Address start, Address end, 142 void FindPointersToNewSpaceInRegion(Address start, Address end,
154 ObjectSlotCallback slot_callback); 143 ObjectSlotCallback slot_callback);
155 144
156 // For each region of pointers on a page in use from an old space call 145 // For each region of pointers on a page in use from an old space call
157 // visit_pointer_region callback. 146 // visit_pointer_region callback.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 199 }
211 200
212 private: 201 private:
213 StoreBuffer* store_buffer_; 202 StoreBuffer* store_buffer_;
214 bool stored_state_; 203 bool stored_state_;
215 }; 204 };
216 } 205 }
217 } // namespace v8::internal 206 } // namespace v8::internal
218 207
219 #endif // V8_STORE_BUFFER_H_ 208 #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