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

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

Issue 7712026: Clear mark bits while sweeping and not explicitly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Correctly handle incremental marking as well. Created 9 years, 4 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void ResetStepCounters() { 195 void ResetStepCounters() {
196 steps_count_ = 0; 196 steps_count_ = 0;
197 steps_took_ = 0; 197 steps_took_ = 0;
198 longest_step_ = 0.0; 198 longest_step_ = 0.0;
199 steps_count_since_last_gc_ = 0; 199 steps_count_since_last_gc_ = 0;
200 steps_took_since_last_gc_ = 0; 200 steps_took_since_last_gc_ = 0;
201 bytes_rescanned_ = 0; 201 bytes_rescanned_ = 0;
202 allocation_marking_factor_ = kInitialAllocationMarkingFactor; 202 allocation_marking_factor_ = kInitialAllocationMarkingFactor;
203 } 203 }
204 204
205 static void ClearMarkbits(PagedSpace* space);
206 static void ClearMarkbits(NewSpace* space);
207 void ClearMarkbits();
208
209 #ifdef DEBUG
210 void VerifyMarkbitsAreClean();
211 static void VerifyMarkbitsAreClean(PagedSpace* space);
212 static void VerifyMarkbitsAreClean(NewSpace* space);
213 #endif
214
215 void StartMarking(); 205 void StartMarking();
216 206
217 void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); 207 static void ActivateIncrementalWriteBarrier(PagedSpace* space);
218 void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); 208 static void ActivateIncrementalWriteBarrier(NewSpace* space);
209 void ActivateIncrementalWriteBarrier();
210
211 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space);
212 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space);
219 void DeactivateIncrementalWriteBarrier(); 213 void DeactivateIncrementalWriteBarrier();
220 214
221 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking); 215 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking);
222 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking); 216 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking);
223 217
224 void EnsureMarkingDequeIsCommitted(); 218 void EnsureMarkingDequeIsCommitted();
225 219
226 Heap* heap_; 220 Heap* heap_;
227 221
228 State state_; 222 State state_;
(...skipping 11 matching lines...) Expand all
240 bool should_hurry_; 234 bool should_hurry_;
241 int allocation_marking_factor_; 235 int allocation_marking_factor_;
242 intptr_t allocated_; 236 intptr_t allocated_;
243 237
244 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 238 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
245 }; 239 };
246 240
247 } } // namespace v8::internal 241 } } // namespace v8::internal
248 242
249 #endif // V8_INCREMENTAL_MARKING_H_ 243 #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