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

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

Issue 1014503003: Hook up over approximating the weak closure to the idle time handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 9 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.cc ('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 8
9 #include "src/execution.h" 9 #include "src/execution.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 inline bool IsStopped() { return state() == STOPPED; } 48 inline bool IsStopped() { return state() == STOPPED; }
49 49
50 INLINE(bool IsMarking()) { return state() >= MARKING; } 50 INLINE(bool IsMarking()) { return state() >= MARKING; }
51 51
52 inline bool IsMarkingIncomplete() { return state() == MARKING; } 52 inline bool IsMarkingIncomplete() { return state() == MARKING; }
53 53
54 inline bool IsComplete() { return state() == COMPLETE; } 54 inline bool IsComplete() { return state() == COMPLETE; }
55 55
56 inline bool IsReadyToOverApproximateWeakClosure() const {
57 return request_type_ == OVERAPPROXIMATION;
58 }
59
56 GCRequestType request_type() const { return request_type_; } 60 GCRequestType request_type() const { return request_type_; }
57 61
58 bool WorthActivating(); 62 bool WorthActivating();
59 63
60 bool ShouldActivate(); 64 bool ShouldActivate();
61 65
62 bool WasActivated(); 66 bool WasActivated();
63 67
64 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; 68 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION };
65 69
66 void Start(CompactionFlag flag = ALLOW_COMPACTION); 70 void Start(CompactionFlag flag = ALLOW_COMPACTION);
67 71
68 void Stop(); 72 void Stop();
69 73
70 void MarkObjectGroups(); 74 void MarkObjectGroups();
71 75
72 void PrepareForScavenge(); 76 void PrepareForScavenge();
73 77
74 void UpdateMarkingDequeAfterScavenge(); 78 void UpdateMarkingDequeAfterScavenge();
75 79
76 void Hurry(); 80 void Hurry();
77 81
78 void Finalize(); 82 void Finalize();
79 83
80 void Abort(); 84 void Abort();
81 85
82 void OverApproximateWeakClosure(); 86 void OverApproximateWeakClosure(CompletionAction action);
83 87
84 void MarkingComplete(CompletionAction action); 88 void MarkingComplete(CompletionAction action);
85 89
86 void Epilogue(); 90 void Epilogue();
87 91
88 // It's hard to know how much work the incremental marker should do to make 92 // It's hard to know how much work the incremental marker should do to make
89 // progress in the face of the mutator creating new work for it. We start 93 // progress in the face of the mutator creating new work for it. We start
90 // of at a moderate rate of work and gradually increase the speed of the 94 // of at a moderate rate of work and gradually increase the speed of the
91 // incremental marker until it completes. 95 // incremental marker until it completes.
92 // Do some marking every time this much memory has been allocated or that many 96 // Do some marking every time this much memory has been allocated or that many
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 bool weak_closure_was_overapproximated_; 254 bool weak_closure_was_overapproximated_;
251 255
252 GCRequestType request_type_; 256 GCRequestType request_type_;
253 257
254 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 258 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
255 }; 259 };
256 } 260 }
257 } // namespace v8::internal 261 } // namespace v8::internal
258 262
259 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ 263 #endif // V8_HEAP_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698