Commit 7b3b9bd3 authored by jochen@chromium.org's avatar jochen@chromium.org

Move the temporary private freelist closer to where it's used

BUG=v8:3104
R=hpayer@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6b1ae170
......@@ -3976,18 +3976,18 @@ intptr_t MarkCompactCollector::SweepConservatively(PagedSpace* space,
}
void MarkCompactCollector::SweepInParallel(PagedSpace* space,
FreeList* private_free_list) {
void MarkCompactCollector::SweepInParallel(PagedSpace* space) {
PageIterator it(space);
FreeList* free_list = space == heap()->old_pointer_space()
? free_list_old_pointer_space_.get()
: free_list_old_data_space_.get();
FreeList private_free_list(space);
while (it.has_next()) {
Page* p = it.next();
if (p->TryParallelSweeping()) {
SweepConservatively<SWEEP_IN_PARALLEL>(space, private_free_list, p);
free_list->Concatenate(private_free_list);
SweepConservatively<SWEEP_IN_PARALLEL>(space, &private_free_list, p);
free_list->Concatenate(&private_free_list);
}
}
}
......
......@@ -717,8 +717,7 @@ class MarkCompactCollector {
MarkingParity marking_parity() { return marking_parity_; }
// Concurrent and parallel sweeping support.
void SweepInParallel(PagedSpace* space,
FreeList* private_free_list);
void SweepInParallel(PagedSpace* space);
void WaitUntilSweepingCompleted();
......
......@@ -44,10 +44,7 @@ SweeperThread::SweeperThread(Isolate* isolate)
collector_(heap_->mark_compact_collector()),
start_sweeping_semaphore_(0),
end_sweeping_semaphore_(0),
stop_semaphore_(0),
private_free_list_old_data_space_(heap_->paged_space(OLD_DATA_SPACE)),
private_free_list_old_pointer_space_(
heap_->paged_space(OLD_POINTER_SPACE)) {
stop_semaphore_(0) {
NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(false));
}
......@@ -66,10 +63,8 @@ void SweeperThread::Run() {
return;
}
collector_->SweepInParallel(heap_->old_data_space(),
&private_free_list_old_data_space_);
collector_->SweepInParallel(heap_->old_pointer_space(),
&private_free_list_old_pointer_space_);
collector_->SweepInParallel(heap_->old_data_space());
collector_->SweepInParallel(heap_->old_pointer_space());
end_sweeping_semaphore_.Signal();
}
}
......
......@@ -59,8 +59,6 @@ class SweeperThread : public Thread {
Semaphore start_sweeping_semaphore_;
Semaphore end_sweeping_semaphore_;
Semaphore stop_semaphore_;
FreeList private_free_list_old_data_space_;
FreeList private_free_list_old_pointer_space_;
volatile AtomicWord stop_thread_;
};
......
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