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

Unified Diff: src/heap.cc

Issue 151149: Always scavenge when doing GCs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 2319)
+++ src/heap.cc (working copy)
@@ -221,6 +221,7 @@
// NewSpace statistics are logged exactly once when --log-gc is turned on.
#if defined(DEBUG) && defined(ENABLE_LOGGING_AND_PROFILING)
if (FLAG_heap_stats) {
+ new_space_.CollectStatistics();
ReportHeapStatistics("After GC");
} else if (FLAG_log_gc) {
new_space_.ReportStatistics();
@@ -428,22 +429,8 @@
old_gen_allocation_limit_ =
old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2);
old_gen_exhausted_ = false;
-
- // If we have used the mark-compact collector to collect the new
- // space, and it has not compacted the new space, we force a
- // separate scavenge collection. This is a hack. It covers the
- // case where (1) a new space collection was requested, (2) the
- // collector selection policy selected the mark-compact collector,
- // and (3) the mark-compact collector policy selected not to
- // compact the new space. In that case, there is no more (usable)
- // free space in the new space after the collection compared to
- // before.
- if (space == NEW_SPACE && !MarkCompactCollector::HasCompacted()) {
- Scavenge();
- }
- } else {
- Scavenge();
}
+ Scavenge();
Counters::objs_since_last_young.Set(0);
PostGarbageCollectionProcessing();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698