Reviewers: Michael Starzinger,
Description:
Set unswept free bytes for concurent sweeper.
BUG=
Please review this at https://chromiumcodereview.appspot.com/12184016/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mark-compact.cc
M src/spaces.h
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index
bdd4785e3e729368ab1c6bf297e48457f9b5c6b4..f767727a812bca2e305dc63abe5565151991c8cd
100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -522,6 +522,8 @@ void MarkCompactCollector::WaitUntilSweepingCompleted()
{
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE));
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE));
heap()->FreeQueuedChunks();
+ heap()->paged_space(OLD_DATA_SPACE)->ResetUnsweptFreeBytes();
+ heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes();
}
}
@@ -3779,6 +3781,7 @@ void MarkCompactCollector::SweepSpace(PagedSpace*
space, SweeperType sweeper) {
reinterpret_cast<intptr_t>(p));
}
p->set_parallel_sweeping(1);
+ space->IncreaseUnsweptFreeBytes(p);
break;
}
case PRECISE: {
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index
07daacfdf63d7c530f9694544435a4c1275121fc..eebb9f94d8b18e0e3776972954209c3fd9a3f252
100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -1756,6 +1756,10 @@ class PagedSpace : public Space {
unswept_free_bytes_ -= (p->area_size() - p->LiveBytes());
}
+ void ResetUnsweptFreeBytes() {
+ unswept_free_bytes_ = 0;
+ }
+
bool AdvanceSweeper(intptr_t bytes_to_sweep);
// When parallel sweeper threads are active this function waits
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.