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

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

Issue 6995018: Ensure that we are getting steps from inline allocation when doing incremental sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 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 | « src/heap.cc ('k') | tools/ll_prof.py » ('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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 if (heap_->old_pointer_space()->IsSweepingComplete() && 238 if (heap_->old_pointer_space()->IsSweepingComplete() &&
239 heap_->old_data_space()->IsSweepingComplete()) { 239 heap_->old_data_space()->IsSweepingComplete()) {
240 StartMarking(); 240 StartMarking();
241 } else { 241 } else {
242 if (FLAG_trace_incremental_marking) { 242 if (FLAG_trace_incremental_marking) {
243 PrintF("[IncrementalMarking] Start sweeping.\n"); 243 PrintF("[IncrementalMarking] Start sweeping.\n");
244 } 244 }
245 state_ = SWEEPING; 245 state_ = SWEEPING;
246 } 246 }
247
248 heap_->new_space()->LowerInlineAllocationLimit(kAllocatedThreshold);
247 } 249 }
248 250
249 251
250 void IncrementalMarking::StartMarking() { 252 void IncrementalMarking::StartMarking() {
251 if (FLAG_trace_incremental_marking) { 253 if (FLAG_trace_incremental_marking) {
252 PrintF("[IncrementalMarking] Start marking\n"); 254 PrintF("[IncrementalMarking] Start marking\n");
253 } 255 }
254 256
255 state_ = MARKING; 257 state_ = MARKING;
256 258
(...skipping 11 matching lines...) Expand all
268 Address new_space_high = heap_->new_space()->ToSpaceHigh(); 270 Address new_space_high = heap_->new_space()->ToSpaceHigh();
269 heap_->marking()->ClearRange( 271 heap_->marking()->ClearRange(
270 new_space_low, static_cast<int>(new_space_high - new_space_low)); 272 new_space_low, static_cast<int>(new_space_high - new_space_low));
271 273
272 ClearMarkbits(); 274 ClearMarkbits();
273 275
274 #ifdef DEBUG 276 #ifdef DEBUG
275 VerifyMarkbitsAreClean(); 277 VerifyMarkbitsAreClean();
276 #endif 278 #endif
277 279
278 heap_->new_space()->LowerInlineAllocationLimit(kAllocatedThreshold);
279
280 // Mark strong roots grey. 280 // Mark strong roots grey.
281 IncrementalMarkingRootMarkingVisitor visitor(heap_, this); 281 IncrementalMarkingRootMarkingVisitor visitor(heap_, this);
282 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); 282 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
283 283
284 // Ready to start incremental marking. 284 // Ready to start incremental marking.
285 if (FLAG_trace_incremental_marking) { 285 if (FLAG_trace_incremental_marking) {
286 PrintF("[IncrementalMarking] Running\n"); 286 PrintF("[IncrementalMarking] Running\n");
287 } 287 }
288 } 288 }
289 289
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 } 461 }
462 462
463 if (FLAG_trace_incremental_marking || FLAG_trace_gc) { 463 if (FLAG_trace_incremental_marking || FLAG_trace_gc) {
464 double end = OS::TimeCurrentMillis(); 464 double end = OS::TimeCurrentMillis();
465 steps_took_ += (end - start); 465 steps_took_ += (end - start);
466 } 466 }
467 } 467 }
468 468
469 469
470 } } // namespace v8::internal 470 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | tools/ll_prof.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698