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

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

Issue 8519002: Start incremental marking on idle notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments, tuned idle round starting conditions. Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 bool should_hurry() { return should_hurry_; } 58 bool should_hurry() { return should_hurry_; }
59 59
60 inline bool IsStopped() { return state() == STOPPED; } 60 inline bool IsStopped() { return state() == STOPPED; }
61 61
62 INLINE(bool IsMarking()) { return state() >= MARKING; } 62 INLINE(bool IsMarking()) { return state() >= MARKING; }
63 63
64 inline bool IsMarkingIncomplete() { return state() == MARKING; } 64 inline bool IsMarkingIncomplete() { return state() == MARKING; }
65 65
66 inline bool IsComplete() { return state() == COMPLETE; }
67
66 bool WorthActivating(); 68 bool WorthActivating();
67 69
68 void Start(); 70 void Start();
69 71
70 void Stop(); 72 void Stop();
71 73
72 void PrepareForScavenge(); 74 void PrepareForScavenge();
73 75
74 void UpdateMarkingDequeAfterScavenge(); 76 void UpdateMarkingDequeAfterScavenge();
75 77
(...skipping 18 matching lines...) Expand all
94 static const intptr_t kFastMarking = 3; 96 static const intptr_t kFastMarking = 3;
95 // After this many steps we increase the marking/allocating factor. 97 // After this many steps we increase the marking/allocating factor.
96 static const intptr_t kAllocationMarkingFactorSpeedupInterval = 1024; 98 static const intptr_t kAllocationMarkingFactorSpeedupInterval = 1024;
97 // This is how much we increase the marking/allocating factor by. 99 // This is how much we increase the marking/allocating factor by.
98 static const intptr_t kAllocationMarkingFactorSpeedup = 2; 100 static const intptr_t kAllocationMarkingFactorSpeedup = 2;
99 static const intptr_t kMaxAllocationMarkingFactor = 1000; 101 static const intptr_t kMaxAllocationMarkingFactor = 1000;
100 102
101 void OldSpaceStep(intptr_t allocated) { 103 void OldSpaceStep(intptr_t allocated) {
102 Step(allocated * kFastMarking / kInitialAllocationMarkingFactor); 104 Step(allocated * kFastMarking / kInitialAllocationMarkingFactor);
103 } 105 }
106
104 void Step(intptr_t allocated); 107 void Step(intptr_t allocated);
105 108
106 inline void RestartIfNotMarking() { 109 inline void RestartIfNotMarking() {
107 if (state_ == COMPLETE) { 110 if (state_ == COMPLETE) {
108 state_ = MARKING; 111 state_ = MARKING;
109 if (FLAG_trace_incremental_marking) { 112 if (FLAG_trace_incremental_marking) {
110 PrintF("[IncrementalMarking] Restarting (new grey objects)\n"); 113 PrintF("[IncrementalMarking] Restarting (new grey objects)\n");
111 } 114 }
112 } 115 }
113 } 116 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 intptr_t allocated_; 272 intptr_t allocated_;
270 273
271 int no_marking_scope_depth_; 274 int no_marking_scope_depth_;
272 275
273 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 276 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
274 }; 277 };
275 278
276 } } // namespace v8::internal 279 } } // namespace v8::internal
277 280
278 #endif // V8_INCREMENTAL_MARKING_H_ 281 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698