Reviewers: Hannes Payer,
Description:
Rename MarkCompactCollector::StealMemoryFromSweeperThreads to
RefillFreeLists
The swept memory is now collected on the foreground thread, so it's not
stealing the memory from the threads anymore
BUG=v8:3104
[email protected]
LOG=n
Please review this at https://codereview.chromium.org/143463005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -6 lines):
M src/mark-compact.h
M src/mark-compact.cc
M src/spaces.cc
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index
3a03ac211faf7cc96e817ba0099e959c3902cb0e..f62435ea9334c196fc2231bb6e6893e7d0320aa1
100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -583,15 +583,14 @@ void
MarkCompactCollector::WaitUntilSweepingCompleted() {
isolate()->sweeper_threads()[i]->WaitForSweeperThread();
}
sweeping_pending_ = false;
- StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE));
- StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE));
+ RefillFreeLists(heap()->paged_space(OLD_DATA_SPACE));
+ RefillFreeLists(heap()->paged_space(OLD_POINTER_SPACE));
heap()->paged_space(OLD_DATA_SPACE)->ResetUnsweptFreeBytes();
heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes();
}
-intptr_t MarkCompactCollector::
- StealMemoryFromSweeperThreads(PagedSpace* space) {
+intptr_t MarkCompactCollector::RefillFreeLists(PagedSpace* space) {
FreeList* free_list = space == heap()->old_pointer_space()
? free_list_old_pointer_space_.get()
: free_list_old_data_space_.get();
Index: src/mark-compact.h
diff --git a/src/mark-compact.h b/src/mark-compact.h
index
c14f0b008450dbb575ff5c3286859a7a379ce6f4..0773d0266683eb712f101a8f1bb026f3ca8d838a
100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -721,7 +721,7 @@ class MarkCompactCollector {
void WaitUntilSweepingCompleted();
- intptr_t StealMemoryFromSweeperThreads(PagedSpace* space);
+ intptr_t RefillFreeLists(PagedSpace* space);
bool AreSweeperThreadsActivated();
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index
70e482f4448b9ad3a5df0a0588667e2d186ce3eb..9af09270698ed00ae5f38c74044f1015f0f788fc
100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -2612,7 +2612,7 @@ bool PagedSpace::EnsureSweeperProgress(intptr_t
size_in_bytes) {
MarkCompactCollector* collector = heap()->mark_compact_collector();
if (collector->AreSweeperThreadsActivated()) {
if (collector->IsConcurrentSweepingInProgress()) {
- if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) {
+ if (collector->RefillFreeLists(this) < size_in_bytes) {
if (!collector->sequential_sweeping()) {
collector->WaitUntilSweepingCompleted();
return true;
--
--
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.