Commit 81bc2f95 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Always sweep precisely.

BUG=
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/398013003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0e41b866
...@@ -515,7 +515,7 @@ DEFINE_BOOL(trace_incremental_marking, false, ...@@ -515,7 +515,7 @@ DEFINE_BOOL(trace_incremental_marking, false,
"trace progress of the incremental marking") "trace progress of the incremental marking")
DEFINE_BOOL(track_gc_object_stats, false, DEFINE_BOOL(track_gc_object_stats, false,
"track object counts and memory usage") "track object counts and memory usage")
DEFINE_BOOL(always_precise_sweeping, false, "always sweep precisely") DEFINE_BOOL(always_precise_sweeping, true, "always sweep precisely")
DEFINE_BOOL(parallel_sweeping, false, "enable parallel sweeping") DEFINE_BOOL(parallel_sweeping, false, "enable parallel sweeping")
DEFINE_BOOL(concurrent_sweeping, true, "enable concurrent sweeping") DEFINE_BOOL(concurrent_sweeping, true, "enable concurrent sweeping")
DEFINE_INT(sweeper_threads, 0, DEFINE_INT(sweeper_threads, 0,
......
...@@ -4208,6 +4208,8 @@ STRUCT_LIST(MAKE_CASE) ...@@ -4208,6 +4208,8 @@ STRUCT_LIST(MAKE_CASE)
bool Heap::IsHeapIterable() { bool Heap::IsHeapIterable() {
// TODO(hpayer): This function is not correct. Allocation folding in old
// space breaks the iterability.
return (old_pointer_space()->swept_precisely() && return (old_pointer_space()->swept_precisely() &&
old_data_space()->swept_precisely() && old_data_space()->swept_precisely() &&
new_space_top_after_last_gc_ == new_space()->top()); new_space_top_after_last_gc_ == new_space()->top());
...@@ -4219,6 +4221,9 @@ void Heap::MakeHeapIterable() { ...@@ -4219,6 +4221,9 @@ void Heap::MakeHeapIterable() {
if (!IsHeapIterable()) { if (!IsHeapIterable()) {
CollectAllGarbage(kMakeHeapIterableMask, "Heap::MakeHeapIterable"); CollectAllGarbage(kMakeHeapIterableMask, "Heap::MakeHeapIterable");
} }
if (mark_compact_collector()->sweeping_in_progress()) {
mark_compact_collector()->EnsureSweepingCompleted();
}
ASSERT(IsHeapIterable()); ASSERT(IsHeapIterable());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment