| 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 // Clients of this interface shouldn't depend on lots of heap internals. | 11 // Clients of this interface shouldn't depend on lots of heap internals. |
| 12 // Do not include anything from src/heap here! | 12 // Do not include anything from src/heap here! |
| 13 #include "include/v8.h" | 13 #include "include/v8.h" |
| 14 #include "src/allocation.h" | 14 #include "src/allocation.h" |
| 15 #include "src/assert-scope.h" | 15 #include "src/assert-scope.h" |
| 16 #include "src/atomic-utils.h" | 16 #include "src/base/atomic-utils.h" |
| 17 #include "src/globals.h" | 17 #include "src/globals.h" |
| 18 #include "src/heap-symbols.h" | 18 #include "src/heap-symbols.h" |
| 19 // TODO(mstarzinger): Two more includes to kill! | 19 // TODO(mstarzinger): Two more includes to kill! |
| 20 #include "src/heap/spaces.h" | 20 #include "src/heap/spaces.h" |
| 21 #include "src/heap/store-buffer.h" | 21 #include "src/heap/store-buffer.h" |
| 22 #include "src/list.h" | 22 #include "src/list.h" |
| 23 | 23 |
| 24 namespace v8 { | 24 namespace v8 { |
| 25 namespace internal { | 25 namespace internal { |
| 26 | 26 |
| (...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 | 1996 |
| 1997 // For keeping track of how much data has survived | 1997 // For keeping track of how much data has survived |
| 1998 // scavenge since last new space expansion. | 1998 // scavenge since last new space expansion. |
| 1999 intptr_t survived_since_last_expansion_; | 1999 intptr_t survived_since_last_expansion_; |
| 2000 | 2000 |
| 2001 // ... and since the last scavenge. | 2001 // ... and since the last scavenge. |
| 2002 intptr_t survived_last_scavenge_; | 2002 intptr_t survived_last_scavenge_; |
| 2003 | 2003 |
| 2004 // This is not the depth of nested AlwaysAllocateScope's but rather a single | 2004 // This is not the depth of nested AlwaysAllocateScope's but rather a single |
| 2005 // count, as scopes can be acquired from multiple tasks (read: threads). | 2005 // count, as scopes can be acquired from multiple tasks (read: threads). |
| 2006 AtomicNumber<size_t> always_allocate_scope_count_; | 2006 base::AtomicNumber<size_t> always_allocate_scope_count_; |
| 2007 | 2007 |
| 2008 // Stores the memory pressure level that set by MemoryPressureNotification | 2008 // Stores the memory pressure level that set by MemoryPressureNotification |
| 2009 // and reset by a mark-compact garbage collection. | 2009 // and reset by a mark-compact garbage collection. |
| 2010 AtomicValue<MemoryPressureLevel> memory_pressure_level_; | 2010 base::AtomicValue<MemoryPressureLevel> memory_pressure_level_; |
| 2011 | 2011 |
| 2012 // For keeping track of context disposals. | 2012 // For keeping track of context disposals. |
| 2013 int contexts_disposed_; | 2013 int contexts_disposed_; |
| 2014 | 2014 |
| 2015 // The length of the retained_maps array at the time of context disposal. | 2015 // The length of the retained_maps array at the time of context disposal. |
| 2016 // This separates maps in the retained_maps array that were created before | 2016 // This separates maps in the retained_maps array that were created before |
| 2017 // and after context disposal. | 2017 // and after context disposal. |
| 2018 int number_of_disposed_maps_; | 2018 int number_of_disposed_maps_; |
| 2019 | 2019 |
| 2020 int global_ic_age_; | 2020 int global_ic_age_; |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2644 friend class LargeObjectSpace; | 2644 friend class LargeObjectSpace; |
| 2645 friend class NewSpace; | 2645 friend class NewSpace; |
| 2646 friend class PagedSpace; | 2646 friend class PagedSpace; |
| 2647 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2647 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2648 }; | 2648 }; |
| 2649 | 2649 |
| 2650 } // namespace internal | 2650 } // namespace internal |
| 2651 } // namespace v8 | 2651 } // namespace v8 |
| 2652 | 2652 |
| 2653 #endif // V8_HEAP_HEAP_H_ | 2653 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |