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

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

Issue 6756006: Exponentially increase incremental marking factor each 512 steps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/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 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 static void UpdateMarkingStackAfterScavenge(); 63 static void UpdateMarkingStackAfterScavenge();
64 64
65 static void Hurry(); 65 static void Hurry();
66 66
67 static void Finalize(); 67 static void Finalize();
68 68
69 static void MarkingComplete(); 69 static void MarkingComplete();
70 70
71 static const intptr_t kAllocatedThreshold = 1024; 71 static const intptr_t kAllocatedThreshold = 1024;
72 static const intptr_t kAllocationMarkingFactor = 8; 72 static const intptr_t kInitialAllocationMarkingFactor = 8;
73 static const intptr_t kAllocationMarkingFactorSpeedupInterval = 512;
74 static const intptr_t kAllocationMarkingFactorSpeedup = 2;
73 75
74 static void Step(intptr_t allocated); 76 static void Step(intptr_t allocated);
75 77
76 static inline void RestartIfNotMarking() { 78 static inline void RestartIfNotMarking() {
77 if (state_ == COMPLETE) { 79 if (state_ == COMPLETE) {
78 state_ = MARKING; 80 state_ = MARKING;
79 if (FLAG_trace_incremental_marking) { 81 if (FLAG_trace_incremental_marking) {
80 PrintF("[IncrementalMarking] Restarting (new grey objects)\n"); 82 PrintF("[IncrementalMarking] Restarting (new grey objects)\n");
81 } 83 }
82 } 84 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 213 }
212 214
213 static inline double steps_took() { 215 static inline double steps_took() {
214 return steps_took_; 216 return steps_took_;
215 } 217 }
216 218
217 private: 219 private:
218 static void ResetStepCounters() { 220 static void ResetStepCounters() {
219 steps_count_ = 0; 221 steps_count_ = 0;
220 steps_took_ = 0; 222 steps_took_ = 0;
223 allocation_marking_factor_ = kInitialAllocationMarkingFactor;
221 } 224 }
222 225
223 226
224 static State state_; 227 static State state_;
225 static MarkingStack marking_stack_; 228 static MarkingStack marking_stack_;
226 229
227 static int steps_count_; 230 static int steps_count_;
228 static double steps_took_; 231 static double steps_took_;
229 232
233 static intptr_t allocation_marking_factor_;
230 }; 234 };
231 235
232 } } // namespace v8::internal 236 } } // namespace v8::internal
233 237
234 #endif // V8_INCREMENTAL_MARKING_H_ 238 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « no previous file | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698