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 |
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2147 void ReduceNewSpaceSize(size_t allocaion_rate); | 2147 void ReduceNewSpaceSize(size_t allocaion_rate); |
2148 | 2148 |
2149 bool TryFinalizeIdleIncrementalMarking( | 2149 bool TryFinalizeIdleIncrementalMarking( |
2150 double idle_time_in_ms, size_t size_of_objects, | 2150 double idle_time_in_ms, size_t size_of_objects, |
2151 size_t mark_compact_speed_in_bytes_per_ms); | 2151 size_t mark_compact_speed_in_bytes_per_ms); |
2152 | 2152 |
2153 GCIdleTimeHandler::HeapState ComputeHeapState(); | 2153 GCIdleTimeHandler::HeapState ComputeHeapState(); |
2154 | 2154 |
2155 bool PerformIdleTimeAction(GCIdleTimeAction action, | 2155 bool PerformIdleTimeAction(GCIdleTimeAction action, |
2156 GCIdleTimeHandler::HeapState heap_state, | 2156 GCIdleTimeHandler::HeapState heap_state, |
2157 double deadline_in_ms, | 2157 double deadline_in_ms); |
2158 bool is_long_idle_notification); | |
2159 | 2158 |
2160 void IdleNotificationEpilogue(GCIdleTimeAction action, | 2159 void IdleNotificationEpilogue(GCIdleTimeAction action, |
2161 GCIdleTimeHandler::HeapState heap_state, | 2160 GCIdleTimeHandler::HeapState heap_state, |
2162 double start_ms, double deadline_in_ms, | 2161 double start_ms, double deadline_in_ms); |
2163 bool is_long_idle_notification); | |
2164 | 2162 |
2165 void ClearObjectStats(bool clear_last_time_stats = false); | 2163 void ClearObjectStats(bool clear_last_time_stats = false); |
2166 | 2164 |
2167 inline void UpdateAllocationsHash(HeapObject* object); | 2165 inline void UpdateAllocationsHash(HeapObject* object); |
2168 inline void UpdateAllocationsHash(uint32_t value); | 2166 inline void UpdateAllocationsHash(uint32_t value); |
2169 inline void PrintAlloctionsHash(); | 2167 inline void PrintAlloctionsHash(); |
2170 | 2168 |
2171 void AddToRingBuffer(const char* string); | 2169 void AddToRingBuffer(const char* string); |
2172 void GetFromRingBuffer(char* buffer); | 2170 void GetFromRingBuffer(char* buffer); |
2173 | 2171 |
(...skipping 30 matching lines...) Expand all Loading... |
2204 MarkCompactCollector mark_compact_collector_; | 2202 MarkCompactCollector mark_compact_collector_; |
2205 | 2203 |
2206 StoreBuffer store_buffer_; | 2204 StoreBuffer store_buffer_; |
2207 | 2205 |
2208 Marking marking_; | 2206 Marking marking_; |
2209 | 2207 |
2210 IncrementalMarking incremental_marking_; | 2208 IncrementalMarking incremental_marking_; |
2211 | 2209 |
2212 GCIdleTimeHandler gc_idle_time_handler_; | 2210 GCIdleTimeHandler gc_idle_time_handler_; |
2213 | 2211 |
2214 unsigned int gc_count_at_last_idle_gc_; | |
2215 | |
2216 // These two counters are monotomically increasing and never reset. | 2212 // These two counters are monotomically increasing and never reset. |
2217 size_t full_codegen_bytes_generated_; | 2213 size_t full_codegen_bytes_generated_; |
2218 size_t crankshaft_codegen_bytes_generated_; | 2214 size_t crankshaft_codegen_bytes_generated_; |
2219 | 2215 |
2220 // This counter is increased before each GC and never reset. | 2216 // This counter is increased before each GC and never reset. |
2221 // To account for the bytes allocated since the last GC, use the | 2217 // To account for the bytes allocated since the last GC, use the |
2222 // NewSpaceAllocationCounter() function. | 2218 // NewSpaceAllocationCounter() function. |
2223 size_t new_space_allocation_counter_; | 2219 size_t new_space_allocation_counter_; |
2224 | 2220 |
2225 // This counter is increased before each GC and never reset. To | 2221 // This counter is increased before each GC and never reset. To |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2731 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2727 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2732 | 2728 |
2733 private: | 2729 private: |
2734 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2730 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2735 }; | 2731 }; |
2736 #endif // DEBUG | 2732 #endif // DEBUG |
2737 } | 2733 } |
2738 } // namespace v8::internal | 2734 } // namespace v8::internal |
2739 | 2735 |
2740 #endif // V8_HEAP_HEAP_H_ | 2736 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |