| 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 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 inline void IncrementNodesDiedInNewSpace() { nodes_died_in_new_space_++; } | 1190 inline void IncrementNodesDiedInNewSpace() { nodes_died_in_new_space_++; } |
| 1191 | 1191 |
| 1192 inline void IncrementNodesCopiedInNewSpace() { nodes_copied_in_new_space_++; } | 1192 inline void IncrementNodesCopiedInNewSpace() { nodes_copied_in_new_space_++; } |
| 1193 | 1193 |
| 1194 inline void IncrementNodesPromoted() { nodes_promoted_++; } | 1194 inline void IncrementNodesPromoted() { nodes_promoted_++; } |
| 1195 | 1195 |
| 1196 inline void IncrementYoungSurvivorsCounter(int survived) { | 1196 inline void IncrementYoungSurvivorsCounter(int survived) { |
| 1197 DCHECK(survived >= 0); | 1197 DCHECK(survived >= 0); |
| 1198 survived_last_scavenge_ = survived; |
| 1198 survived_since_last_expansion_ += survived; | 1199 survived_since_last_expansion_ += survived; |
| 1199 } | 1200 } |
| 1200 | 1201 |
| 1201 inline bool NextGCIsLikelyToBeFull() { | 1202 inline bool NextGCIsLikelyToBeFull() { |
| 1202 if (FLAG_gc_global) return true; | 1203 if (FLAG_gc_global) return true; |
| 1203 | 1204 |
| 1204 if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true; | 1205 if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true; |
| 1205 | 1206 |
| 1206 intptr_t adjusted_allocation_limit = | 1207 intptr_t adjusted_allocation_limit = |
| 1207 old_generation_allocation_limit_ - new_space_.Capacity(); | 1208 old_generation_allocation_limit_ - new_space_.Capacity(); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 int initial_semispace_size_; | 1500 int initial_semispace_size_; |
| 1500 int target_semispace_size_; | 1501 int target_semispace_size_; |
| 1501 intptr_t max_old_generation_size_; | 1502 intptr_t max_old_generation_size_; |
| 1502 intptr_t max_executable_size_; | 1503 intptr_t max_executable_size_; |
| 1503 intptr_t maximum_committed_; | 1504 intptr_t maximum_committed_; |
| 1504 | 1505 |
| 1505 // For keeping track of how much data has survived | 1506 // For keeping track of how much data has survived |
| 1506 // scavenge since last new space expansion. | 1507 // scavenge since last new space expansion. |
| 1507 int survived_since_last_expansion_; | 1508 int survived_since_last_expansion_; |
| 1508 | 1509 |
| 1510 // ... and since the last scavenge. |
| 1511 int survived_last_scavenge_; |
| 1512 |
| 1509 // For keeping track on when to flush RegExp code. | 1513 // For keeping track on when to flush RegExp code. |
| 1510 int sweep_generation_; | 1514 int sweep_generation_; |
| 1511 | 1515 |
| 1512 int always_allocate_scope_depth_; | 1516 int always_allocate_scope_depth_; |
| 1513 | 1517 |
| 1514 // For keeping track of context disposals. | 1518 // For keeping track of context disposals. |
| 1515 int contexts_disposed_; | 1519 int contexts_disposed_; |
| 1516 | 1520 |
| 1517 int global_ic_age_; | 1521 int global_ic_age_; |
| 1518 | 1522 |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2572 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2576 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2573 | 2577 |
| 2574 private: | 2578 private: |
| 2575 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2579 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2576 }; | 2580 }; |
| 2577 #endif // DEBUG | 2581 #endif // DEBUG |
| 2578 } | 2582 } |
| 2579 } // namespace v8::internal | 2583 } // namespace v8::internal |
| 2580 | 2584 |
| 2581 #endif // V8_HEAP_HEAP_H_ | 2585 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |