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

Side by Side Diff: runtime/vm/scavenger.cc

Issue 10442073: Implement growth policy for old space using time and space signals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 6 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 | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/scavenger.h" 5 #include "vm/scavenger.h"
6 6
7 #include "vm/dart.h" 7 #include "vm/dart.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // TODO(cshapiro): Add a decision procedure for determining when the 348 // TODO(cshapiro): Add a decision procedure for determining when the
349 // the API callbacks should be invoked. 349 // the API callbacks should be invoked.
350 Scavenge(false); 350 Scavenge(false);
351 } 351 }
352 352
353 353
354 void Scavenger::Scavenge(bool invoke_api_callbacks) { 354 void Scavenger::Scavenge(bool invoke_api_callbacks) {
355 // Scavenging is not reentrant. Make sure that is the case. 355 // Scavenging is not reentrant. Make sure that is the case.
356 ASSERT(!scavenging_); 356 ASSERT(!scavenging_);
357 scavenging_ = true; 357 scavenging_ = true;
358 had_promotion_failure_ = false;
358 Isolate* isolate = Isolate::Current(); 359 Isolate* isolate = Isolate::Current();
359 NoHandleScope no_handles(isolate); 360 NoHandleScope no_handles(isolate);
360 361
361 if (FLAG_verify_before_gc) { 362 if (FLAG_verify_before_gc) {
362 OS::PrintErr("Verifying before Scavenge... "); 363 OS::PrintErr("Verifying before Scavenge... ");
363 heap_->Verify(); 364 heap_->Verify();
364 OS::PrintErr(" done.\n"); 365 OS::PrintErr(" done.\n");
365 } 366 }
366 367
367 Timer timer(FLAG_verbose_gc, "Scavenge"); 368 Timer timer(FLAG_verbose_gc, "Scavenge");
(...skipping 18 matching lines...) Expand all
386 OS::PrintErr(" done.\n"); 387 OS::PrintErr(" done.\n");
387 } 388 }
388 389
389 count_++; 390 count_++;
390 // Done scavenging. Reset the marker. 391 // Done scavenging. Reset the marker.
391 ASSERT(scavenging_); 392 ASSERT(scavenging_);
392 scavenging_ = false; 393 scavenging_ = false;
393 } 394 }
394 395
395 } // namespace dart 396 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698