OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "src/allocation.h" | 11 #include "src/allocation.h" |
12 #include "src/assert-scope.h" | 12 #include "src/assert-scope.h" |
13 #include "src/globals.h" | 13 #include "src/globals.h" |
14 #include "src/heap/gc-idle-time-handler.h" | 14 #include "src/heap/gc-idle-time-handler.h" |
15 #include "src/heap/incremental-marking.h" | 15 #include "src/heap/incremental-marking.h" |
16 #include "src/heap/mark-compact.h" | 16 #include "src/heap/mark-compact.h" |
17 #include "src/heap/memory-reducer.h" | |
18 #include "src/heap/objects-visiting.h" | 17 #include "src/heap/objects-visiting.h" |
19 #include "src/heap/spaces.h" | 18 #include "src/heap/spaces.h" |
20 #include "src/heap/store-buffer.h" | 19 #include "src/heap/store-buffer.h" |
21 #include "src/list.h" | 20 #include "src/list.h" |
22 | 21 |
23 namespace v8 { | 22 namespace v8 { |
24 namespace internal { | 23 namespace internal { |
25 | 24 |
26 // Defines all the roots in Heap. | 25 // Defines all the roots in Heap. |
27 #define STRONG_ROOT_LIST(V) \ | 26 #define STRONG_ROOT_LIST(V) \ |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 V(ArgumentsMarkerMap) \ | 392 V(ArgumentsMarkerMap) \ |
394 V(JSMessageObjectMap) \ | 393 V(JSMessageObjectMap) \ |
395 V(ForeignMap) \ | 394 V(ForeignMap) \ |
396 V(NeanderMap) \ | 395 V(NeanderMap) \ |
397 V(empty_string) \ | 396 V(empty_string) \ |
398 PRIVATE_SYMBOL_LIST(V) | 397 PRIVATE_SYMBOL_LIST(V) |
399 | 398 |
400 // Forward declarations. | 399 // Forward declarations. |
401 class HeapStats; | 400 class HeapStats; |
402 class Isolate; | 401 class Isolate; |
| 402 class MemoryReducer; |
403 class WeakObjectRetainer; | 403 class WeakObjectRetainer; |
404 | 404 |
405 | 405 |
406 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, | 406 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, |
407 Object** pointer); | 407 Object** pointer); |
408 | 408 |
409 class StoreBufferRebuilder { | 409 class StoreBufferRebuilder { |
410 public: | 410 public: |
411 explicit StoreBufferRebuilder(StoreBuffer* store_buffer) | 411 explicit StoreBufferRebuilder(StoreBuffer* store_buffer) |
412 : store_buffer_(store_buffer) {} | 412 : store_buffer_(store_buffer) {} |
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2208 double last_gc_time_; | 2208 double last_gc_time_; |
2209 | 2209 |
2210 MarkCompactCollector mark_compact_collector_; | 2210 MarkCompactCollector mark_compact_collector_; |
2211 | 2211 |
2212 StoreBuffer store_buffer_; | 2212 StoreBuffer store_buffer_; |
2213 | 2213 |
2214 IncrementalMarking incremental_marking_; | 2214 IncrementalMarking incremental_marking_; |
2215 | 2215 |
2216 GCIdleTimeHandler gc_idle_time_handler_; | 2216 GCIdleTimeHandler gc_idle_time_handler_; |
2217 | 2217 |
2218 MemoryReducer memory_reducer_; | 2218 MemoryReducer* memory_reducer_; |
2219 | 2219 |
2220 // These two counters are monotomically increasing and never reset. | 2220 // These two counters are monotomically increasing and never reset. |
2221 size_t full_codegen_bytes_generated_; | 2221 size_t full_codegen_bytes_generated_; |
2222 size_t crankshaft_codegen_bytes_generated_; | 2222 size_t crankshaft_codegen_bytes_generated_; |
2223 | 2223 |
2224 // This counter is increased before each GC and never reset. | 2224 // This counter is increased before each GC and never reset. |
2225 // To account for the bytes allocated since the last GC, use the | 2225 // To account for the bytes allocated since the last GC, use the |
2226 // NewSpaceAllocationCounter() function. | 2226 // NewSpaceAllocationCounter() function. |
2227 size_t new_space_allocation_counter_; | 2227 size_t new_space_allocation_counter_; |
2228 | 2228 |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2695 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2695 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2696 | 2696 |
2697 private: | 2697 private: |
2698 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2698 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2699 }; | 2699 }; |
2700 #endif // DEBUG | 2700 #endif // DEBUG |
2701 } | 2701 } |
2702 } // namespace v8::internal | 2702 } // namespace v8::internal |
2703 | 2703 |
2704 #endif // V8_HEAP_HEAP_H_ | 2704 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |