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

Unified Diff: src/incremental-marking-inl.h

Issue 7528022: Fix the --max-old-space-size flag so it can be used on 64 bit for (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/incremental-marking.cc ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking-inl.h
===================================================================
--- src/incremental-marking-inl.h (revision 8858)
+++ src/incremental-marking-inl.h (working copy)
@@ -92,6 +92,21 @@
ASSERT(obj->Size() >= 2*kPointerSize);
ASSERT(IsMarking());
Marking::BlackToGrey(mark_bit);
+ int64_t old_bytes_rescanned = bytes_rescanned_;
+ bytes_rescanned_ = old_bytes_rescanned + obj->Size();
+ if ((bytes_rescanned_ >> 20) != (old_bytes_rescanned >> 20)) {
+ if (bytes_rescanned_ > 2 * heap_->PromotedSpaceSize()) {
+ // If we have queued twice the heap size for rescanning then we are
+ // going around in circles, scanning the same objects again and again
+ // as the program mutates the heap faster than we can incrementally
+ // trace it. In this case we switch to non-incremental marking in
+ // order to finish off this marking phase.
+ if (FLAG_trace_gc) {
+ PrintF("Hurrying incremental marking because of lack of progress\n");
+ }
+ allocation_marking_factor_ = kMaxAllocationMarkingFactor;
+ }
+ }
marking_deque_.UnshiftGrey(obj);
}
« no previous file with comments | « src/incremental-marking.cc ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698