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 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 VMState<EXTERNAL> state(isolate_); | 1298 VMState<EXTERNAL> state(isolate_); |
1299 HandleScope handle_scope(isolate_); | 1299 HandleScope handle_scope(isolate_); |
1300 CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags); | 1300 CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags); |
1301 } | 1301 } |
1302 } | 1302 } |
1303 | 1303 |
1304 EnsureFromSpaceIsCommitted(); | 1304 EnsureFromSpaceIsCommitted(); |
1305 | 1305 |
1306 int start_new_space_size = Heap::new_space()->SizeAsInt(); | 1306 int start_new_space_size = Heap::new_space()->SizeAsInt(); |
1307 | 1307 |
1308 if (IsHighSurvivalRate()) { | |
1309 // We speed up the incremental marker if it is running so that it | |
1310 // does not fall behind the rate of promotion, which would cause a | |
1311 // constantly growing old space. | |
1312 incremental_marking()->NotifyOfHighPromotionRate(); | |
1313 } | |
1314 | |
1315 { | 1308 { |
1316 Heap::PretenuringScope pretenuring_scope(this); | 1309 Heap::PretenuringScope pretenuring_scope(this); |
1317 | 1310 |
1318 if (collector == MARK_COMPACTOR) { | 1311 if (collector == MARK_COMPACTOR) { |
1319 UpdateOldGenerationAllocationCounter(); | 1312 UpdateOldGenerationAllocationCounter(); |
1320 // Perform mark-sweep with optional compaction. | 1313 // Perform mark-sweep with optional compaction. |
1321 MarkCompact(); | 1314 MarkCompact(); |
1322 old_gen_exhausted_ = false; | 1315 old_gen_exhausted_ = false; |
1323 old_generation_size_configured_ = true; | 1316 old_generation_size_configured_ = true; |
1324 // This should be updated before PostGarbageCollectionProcessing, which | 1317 // This should be updated before PostGarbageCollectionProcessing, which |
(...skipping 5182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6507 } | 6500 } |
6508 | 6501 |
6509 | 6502 |
6510 // static | 6503 // static |
6511 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6504 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6512 return StaticVisitorBase::GetVisitorId(map); | 6505 return StaticVisitorBase::GetVisitorId(map); |
6513 } | 6506 } |
6514 | 6507 |
6515 } // namespace internal | 6508 } // namespace internal |
6516 } // namespace v8 | 6509 } // namespace v8 |
OLD | NEW |