Revision: 11904 Author: [email protected] Date: Fri Jun 22 04:47:30 2012 Log: Fix lazy sweeping heuristics to prevent old-space expansion.
This is a temporary fix to prevent excessive expansion of old-space caused by inaccuracies in lazy sweeper advancing. We actually don't intend to sweep any pages eagerly, but that requires further changes to lazy sweeping. [email protected],[email protected] BUG=v8:2194 Review URL: https://chromiumcodereview.appspot.com/10640002 http://code.google.com/p/v8/source/detail?r=11904 Modified: /branches/bleeding_edge/src/mark-compact.cc ======================================= --- /branches/bleeding_edge/src/mark-compact.cc Fri Jun 22 03:11:19 2012 +++ /branches/bleeding_edge/src/mark-compact.cc Fri Jun 22 04:47:30 2012 @@ -3823,12 +3823,6 @@ bool lazy_sweeping_active = false; bool unused_page_present = false; - intptr_t old_space_size = heap()->PromotedSpaceSizeOfObjects(); - intptr_t space_left = - Min(heap()->OldGenLimit(old_space_size, Heap::kMinPromotionLimit), - heap()->OldGenLimit(old_space_size, Heap::kMinAllocationLimit)) - - old_space_size; - while (it.has_next()) { Page* p = it.next(); @@ -3888,7 +3882,7 @@ } freed_bytes += SweepConservatively(space, p); pages_swept++; - if (space_left + freed_bytes > newspace_size) { + if (freed_bytes > 2 * newspace_size) { space->SetPagesToSweep(p->next_page()); lazy_sweeping_active = true; } else { -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
