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

Unified Diff: runtime/vm/pages.cc

Issue 631013002: Avoid verifying heap while sweeper is running. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
===================================================================
--- runtime/vm/pages.cc (revision 40943)
+++ runtime/vm/pages.cc (working copy)
@@ -656,7 +656,7 @@
}
if (FLAG_verify_before_gc) {
- OS::PrintErr("Verifying before MarkSweep...");
+ OS::PrintErr("Verifying before marking...");
heap_->Verify();
OS::PrintErr(" done.\n");
}
@@ -689,6 +689,11 @@
int64_t mid3 = 0;
{
+ if (FLAG_verify_before_gc) {
+ OS::PrintErr("Verifying before sweeping...");
+ heap_->Verify(kAllowMarked);
+ OS::PrintErr(" done.\n");
+ }
GCSweeper sweeper;
// During stop-the-world phases we should use bulk lock when adding elements
@@ -744,6 +749,11 @@
// Advance to the next page.
page = next_page;
}
+ if (FLAG_verify_after_gc) {
+ OS::PrintErr("Verifying after sweeping...");
+ heap_->Verify(kForbidMarked);
+ OS::PrintErr(" done.\n");
+ }
} else {
// Start the concurrent sweeper task now.
GCSweeper::SweepConcurrent(
@@ -772,12 +782,6 @@
freelist_[HeapPage::kExecutable].Print();
}
- if (FLAG_verify_after_gc) {
- OS::PrintErr("Verifying after MarkSweep...");
- heap_->Verify(FLAG_concurrent_sweep ? kAllowMarked : kForbidMarked);
- OS::PrintErr(" done.\n");
- }
-
// Done, reset the task count.
{
MonitorLocker ml(tasks_lock());
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698