OLD | NEW |
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/checks.h" | 9 #include "src/base/logging.h" |
| 10 #include "src/base/platform/platform.h" |
10 #include "src/globals.h" | 11 #include "src/globals.h" |
11 #include "src/platform.h" | |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 class Page; | 16 class Page; |
17 class PagedSpace; | 17 class PagedSpace; |
18 class StoreBuffer; | 18 class StoreBuffer; |
19 | 19 |
20 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to); | 20 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to); |
21 | 21 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // The store buffer is divided up into a new buffer that is constantly being | 112 // The store buffer is divided up into a new buffer that is constantly being |
113 // filled by mutator activity and an old buffer that is filled with the data | 113 // filled by mutator activity and an old buffer that is filled with the data |
114 // from the new buffer after compression. | 114 // from the new buffer after compression. |
115 Address* start_; | 115 Address* start_; |
116 Address* limit_; | 116 Address* limit_; |
117 | 117 |
118 Address* old_start_; | 118 Address* old_start_; |
119 Address* old_limit_; | 119 Address* old_limit_; |
120 Address* old_top_; | 120 Address* old_top_; |
121 Address* old_reserved_limit_; | 121 Address* old_reserved_limit_; |
122 VirtualMemory* old_virtual_memory_; | 122 base::VirtualMemory* old_virtual_memory_; |
123 | 123 |
124 bool old_buffer_is_sorted_; | 124 bool old_buffer_is_sorted_; |
125 bool old_buffer_is_filtered_; | 125 bool old_buffer_is_filtered_; |
126 bool during_gc_; | 126 bool during_gc_; |
127 // The garbage collector iterates over many pointers to new space that are not | 127 // The garbage collector iterates over many pointers to new space that are not |
128 // handled by the store buffer. This flag indicates whether the pointers | 128 // handled by the store buffer. This flag indicates whether the pointers |
129 // found by the callbacks should be added to the store buffer or not. | 129 // found by the callbacks should be added to the store buffer or not. |
130 bool store_buffer_rebuilding_enabled_; | 130 bool store_buffer_rebuilding_enabled_; |
131 StoreBufferCallback callback_; | 131 StoreBufferCallback callback_; |
132 bool may_move_store_buffer_entries_; | 132 bool may_move_store_buffer_entries_; |
133 | 133 |
134 VirtualMemory* virtual_memory_; | 134 base::VirtualMemory* virtual_memory_; |
135 | 135 |
136 // Two hash sets used for filtering. | 136 // Two hash sets used for filtering. |
137 // If address is in the hash set then it is guaranteed to be in the | 137 // If address is in the hash set then it is guaranteed to be in the |
138 // old part of the store buffer. | 138 // old part of the store buffer. |
139 uintptr_t* hash_set_1_; | 139 uintptr_t* hash_set_1_; |
140 uintptr_t* hash_set_2_; | 140 uintptr_t* hash_set_2_; |
141 bool hash_sets_are_empty_; | 141 bool hash_sets_are_empty_; |
142 | 142 |
143 void ClearFilteringHashSets(); | 143 void ClearFilteringHashSets(); |
144 | 144 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 229 } |
230 | 230 |
231 private: | 231 private: |
232 StoreBuffer* store_buffer_; | 232 StoreBuffer* store_buffer_; |
233 bool stored_state_; | 233 bool stored_state_; |
234 }; | 234 }; |
235 | 235 |
236 } } // namespace v8::internal | 236 } } // namespace v8::internal |
237 | 237 |
238 #endif // V8_STORE_BUFFER_H_ | 238 #endif // V8_STORE_BUFFER_H_ |
OLD | NEW |