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

Side by Side Diff: src/heap/incremental-marking.h

Issue 2364923002: [heap] New heuristics for starting of incremental marking. (Closed)
Patch Set: rebase Created 4 years, 2 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 | « src/heap/heap-inl.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
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 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_
6 #define V8_HEAP_INCREMENTAL_MARKING_H_ 6 #define V8_HEAP_INCREMENTAL_MARKING_H_
7 7
8 #include "src/cancelable-task.h" 8 #include "src/cancelable-task.h"
9 #include "src/execution.h" 9 #include "src/execution.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 inline bool IsReadyToOverApproximateWeakClosure() const { 65 inline bool IsReadyToOverApproximateWeakClosure() const {
66 return request_type_ == FINALIZATION && !finalize_marking_completed_; 66 return request_type_ == FINALIZATION && !finalize_marking_completed_;
67 } 67 }
68 68
69 GCRequestType request_type() const { return request_type_; } 69 GCRequestType request_type() const { return request_type_; }
70 70
71 void reset_request_type() { request_type_ = NONE; } 71 void reset_request_type() { request_type_ = NONE; }
72 72
73 bool CanBeActivated(); 73 bool CanBeActivated();
74 74
75 bool ShouldActivateEvenWithoutIdleNotification();
76
77 bool WasActivated(); 75 bool WasActivated();
78 76
79 void Start(GarbageCollectionReason gc_reason); 77 void Start(GarbageCollectionReason gc_reason);
80 78
81 void FinalizeIncrementally(); 79 void FinalizeIncrementally();
82 80
83 void UpdateMarkingDequeAfterScavenge(); 81 void UpdateMarkingDequeAfterScavenge();
84 82
85 void Hurry(); 83 void Hurry();
86 84
(...skipping 23 matching lines...) Expand all
110 // heavy (color-checking) write barriers have been invoked. 108 // heavy (color-checking) write barriers have been invoked.
111 static const size_t kAllocatedThreshold = 64 * KB; 109 static const size_t kAllocatedThreshold = 64 * KB;
112 110
113 static const int kStepSizeInMs = 1; 111 static const int kStepSizeInMs = 1;
114 static const int kMaxStepSizeInMs = 5; 112 static const int kMaxStepSizeInMs = 5;
115 113
116 // This is the upper bound for how many times we allow finalization of 114 // This is the upper bound for how many times we allow finalization of
117 // incremental marking to be postponed. 115 // incremental marking to be postponed.
118 static const int kMaxIdleMarkingDelayCounter = 3; 116 static const int kMaxIdleMarkingDelayCounter = 3;
119 117
118 #ifndef DEBUG
119 static const intptr_t kActivationThreshold = 8 * MB;
120 #else
121 static const intptr_t kActivationThreshold = 0;
122 #endif
123
120 void FinalizeSweeping(); 124 void FinalizeSweeping();
121 125
122 size_t Step(size_t bytes_to_process, CompletionAction action, 126 size_t Step(size_t bytes_to_process, CompletionAction action,
123 ForceCompletionAction completion, StepOrigin step_origin); 127 ForceCompletionAction completion, StepOrigin step_origin);
124 128
125 inline void RestartIfNotMarking(); 129 inline void RestartIfNotMarking();
126 130
127 static void RecordWriteFromCode(HeapObject* obj, Object** slot, 131 static void RecordWriteFromCode(HeapObject* obj, Object** slot,
128 Isolate* isolate); 132 Isolate* isolate);
129 133
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 IncrementalMarkingJob incremental_marking_job_; 299 IncrementalMarkingJob incremental_marking_job_;
296 Observer new_generation_observer_; 300 Observer new_generation_observer_;
297 Observer old_generation_observer_; 301 Observer old_generation_observer_;
298 302
299 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 303 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
300 }; 304 };
301 } // namespace internal 305 } // namespace internal
302 } // namespace v8 306 } // namespace v8
303 307
304 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ 308 #endif // V8_HEAP_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698