| 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 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 // Calculates the allocation limit based on a given growing factor and a | 1893 // Calculates the allocation limit based on a given growing factor and a |
| 1894 // given old generation size. | 1894 // given old generation size. |
| 1895 intptr_t CalculateOldGenerationAllocationLimit(double factor, | 1895 intptr_t CalculateOldGenerationAllocationLimit(double factor, |
| 1896 intptr_t old_gen_size); | 1896 intptr_t old_gen_size); |
| 1897 | 1897 |
| 1898 // Sets the allocation limit to trigger the next full garbage collection. | 1898 // Sets the allocation limit to trigger the next full garbage collection. |
| 1899 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, | 1899 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, |
| 1900 double mutator_speed); | 1900 double mutator_speed); |
| 1901 | 1901 |
| 1902 // =========================================================================== | 1902 // =========================================================================== |
| 1903 // Inline allocation. ======================================================== | |
| 1904 // =========================================================================== | |
| 1905 | |
| 1906 void LowerInlineAllocationLimit(intptr_t step); | |
| 1907 void ResetInlineAllocationLimit(); | |
| 1908 | |
| 1909 // =========================================================================== | |
| 1910 // Idle notification. ======================================================== | 1903 // Idle notification. ======================================================== |
| 1911 // =========================================================================== | 1904 // =========================================================================== |
| 1912 | 1905 |
| 1913 bool RecentIdleNotificationHappened(); | 1906 bool RecentIdleNotificationHappened(); |
| 1914 void ScheduleIdleScavengeIfNeeded(int bytes_allocated); | 1907 void ScheduleIdleScavengeIfNeeded(int bytes_allocated); |
| 1915 | 1908 |
| 1916 // =========================================================================== | 1909 // =========================================================================== |
| 1917 // Allocation methods. ======================================================= | 1910 // Allocation methods. ======================================================= |
| 1918 // =========================================================================== | 1911 // =========================================================================== |
| 1919 | 1912 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 IncrementalMarking* incremental_marking_; | 2279 IncrementalMarking* incremental_marking_; |
| 2287 | 2280 |
| 2288 GCIdleTimeHandler* gc_idle_time_handler_; | 2281 GCIdleTimeHandler* gc_idle_time_handler_; |
| 2289 | 2282 |
| 2290 MemoryReducer* memory_reducer_; | 2283 MemoryReducer* memory_reducer_; |
| 2291 | 2284 |
| 2292 ObjectStats* object_stats_; | 2285 ObjectStats* object_stats_; |
| 2293 | 2286 |
| 2294 ScavengeJob* scavenge_job_; | 2287 ScavengeJob* scavenge_job_; |
| 2295 | 2288 |
| 2289 InlineAllocationObserver* idle_scavenge_observer_; |
| 2290 |
| 2296 // These two counters are monotomically increasing and never reset. | 2291 // These two counters are monotomically increasing and never reset. |
| 2297 size_t full_codegen_bytes_generated_; | 2292 size_t full_codegen_bytes_generated_; |
| 2298 size_t crankshaft_codegen_bytes_generated_; | 2293 size_t crankshaft_codegen_bytes_generated_; |
| 2299 | 2294 |
| 2300 // This counter is increased before each GC and never reset. | 2295 // This counter is increased before each GC and never reset. |
| 2301 // To account for the bytes allocated since the last GC, use the | 2296 // To account for the bytes allocated since the last GC, use the |
| 2302 // NewSpaceAllocationCounter() function. | 2297 // NewSpaceAllocationCounter() function. |
| 2303 size_t new_space_allocation_counter_; | 2298 size_t new_space_allocation_counter_; |
| 2304 | 2299 |
| 2305 // This counter is increased before each GC and never reset. To | 2300 // This counter is increased before each GC and never reset. To |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2356 | 2351 |
| 2357 StrongRootsList* strong_roots_list_; | 2352 StrongRootsList* strong_roots_list_; |
| 2358 | 2353 |
| 2359 ArrayBufferTracker* array_buffer_tracker_; | 2354 ArrayBufferTracker* array_buffer_tracker_; |
| 2360 | 2355 |
| 2361 // Classes in "heap" can be friends. | 2356 // Classes in "heap" can be friends. |
| 2362 friend class AlwaysAllocateScope; | 2357 friend class AlwaysAllocateScope; |
| 2363 friend class GCCallbacksScope; | 2358 friend class GCCallbacksScope; |
| 2364 friend class GCTracer; | 2359 friend class GCTracer; |
| 2365 friend class HeapIterator; | 2360 friend class HeapIterator; |
| 2361 friend class IdleScavengeObserver; |
| 2366 friend class IncrementalMarking; | 2362 friend class IncrementalMarking; |
| 2367 friend class MarkCompactCollector; | 2363 friend class MarkCompactCollector; |
| 2368 friend class MarkCompactMarkingVisitor; | 2364 friend class MarkCompactMarkingVisitor; |
| 2369 friend class NewSpace; | 2365 friend class NewSpace; |
| 2370 friend class ObjectStatsVisitor; | 2366 friend class ObjectStatsVisitor; |
| 2371 friend class Page; | 2367 friend class Page; |
| 2372 friend class Scavenger; | 2368 friend class Scavenger; |
| 2373 friend class StoreBuffer; | 2369 friend class StoreBuffer; |
| 2374 | 2370 |
| 2375 // The allocator interface. | 2371 // The allocator interface. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2724 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2729 | 2725 |
| 2730 private: | 2726 private: |
| 2731 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2727 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2732 }; | 2728 }; |
| 2733 #endif // DEBUG | 2729 #endif // DEBUG |
| 2734 } // namespace internal | 2730 } // namespace internal |
| 2735 } // namespace v8 | 2731 } // namespace v8 |
| 2736 | 2732 |
| 2737 #endif // V8_HEAP_HEAP_H_ | 2733 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |