Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Side by Side Diff: src/heap/heap.cc

Issue 2868103002: [deserializer] Make large object deserialization GC safe (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | src/snapshot/deserializer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/ast/context-slot-cache.h" 10 #include "src/ast/context-slot-cache.h"
(...skipping 5359 matching lines...) Expand 10 before | Expand all | Expand 10 after
5370 } 5370 }
5371 return true; 5371 return true;
5372 } 5372 }
5373 5373
5374 // This function returns either kNoLimit, kSoftLimit, or kHardLimit. 5374 // This function returns either kNoLimit, kSoftLimit, or kHardLimit.
5375 // The kNoLimit means that either incremental marking is disabled or it is too 5375 // The kNoLimit means that either incremental marking is disabled or it is too
5376 // early to start incremental marking. 5376 // early to start incremental marking.
5377 // The kSoftLimit means that incremental marking should be started soon. 5377 // The kSoftLimit means that incremental marking should be started soon.
5378 // The kHardLimit means that incremental marking should be started immediately. 5378 // The kHardLimit means that incremental marking should be started immediately.
5379 Heap::IncrementalMarkingLimit Heap::IncrementalMarkingLimitReached() { 5379 Heap::IncrementalMarkingLimit Heap::IncrementalMarkingLimitReached() {
5380 if (!incremental_marking()->CanBeActivated() || 5380 if (!incremental_marking()->CanBeActivated() || always_allocate() ||
5381 PromotedSpaceSizeOfObjects() <= 5381 PromotedSpaceSizeOfObjects() <=
5382 IncrementalMarking::kActivationThreshold) { 5382 IncrementalMarking::kActivationThreshold) {
5383 // Incremental marking is disabled or it is too early to start. 5383 // Incremental marking is disabled or it is too early to start.
5384 return IncrementalMarkingLimit::kNoLimit; 5384 return IncrementalMarkingLimit::kNoLimit;
5385 } 5385 }
5386 if ((FLAG_stress_compaction && (gc_count_ & 1) != 0) || 5386 if ((FLAG_stress_compaction && (gc_count_ & 1) != 0) ||
5387 HighMemoryPressure()) { 5387 HighMemoryPressure()) {
5388 // If there is high memory pressure or stress testing is enabled, then 5388 // If there is high memory pressure or stress testing is enabled, then
5389 // start marking immediately. 5389 // start marking immediately.
5390 return IncrementalMarkingLimit::kHardLimit; 5390 return IncrementalMarkingLimit::kHardLimit;
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
6391 case LO_SPACE: 6391 case LO_SPACE:
6392 return "LO_SPACE"; 6392 return "LO_SPACE";
6393 default: 6393 default:
6394 UNREACHABLE(); 6394 UNREACHABLE();
6395 } 6395 }
6396 return NULL; 6396 return NULL;
6397 } 6397 }
6398 6398
6399 } // namespace internal 6399 } // namespace internal
6400 } // namespace v8 6400 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | src/snapshot/deserializer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698