Index: runtime/vm/gc_sweeper.cc |
diff --git a/runtime/vm/gc_sweeper.cc b/runtime/vm/gc_sweeper.cc |
index a192138b4c6f5a72ddf92f2360cb4ea8c7ded1e4..25c00a098aa2b9fe214fd719016aedc1aa49833c 100644 |
--- a/runtime/vm/gc_sweeper.cc |
+++ b/runtime/vm/gc_sweeper.cc |
@@ -9,8 +9,8 @@ |
#include "vm/heap.h" |
#include "vm/lockers.h" |
#include "vm/pages.h" |
+#include "vm/safepoint.h" |
#include "vm/thread_pool.h" |
-#include "vm/thread_registry.h" |
namespace dart { |
@@ -116,13 +116,13 @@ class SweeperTask : public ThreadPool::Task { |
virtual void Run() { |
bool result = Thread::EnterIsolateAsHelper(task_isolate_); |
ASSERT(result); |
+ Thread* thread = Thread::Current(); |
GCSweeper sweeper; |
HeapPage* page = first_; |
HeapPage* prev_page = NULL; |
while (page != NULL) { |
- task_isolate_->thread_registry()->CheckSafepoint(); |
HeapPage* next_page = page->next(); |
ASSERT(page->type() == HeapPage::kData); |
bool page_in_use = sweeper.SweepPage(page, freelist_, false); |
@@ -134,6 +134,7 @@ class SweeperTask : public ThreadPool::Task { |
{ |
// Notify the mutator thread that we have added elements to the free |
// list or that more capacity is available. |
+ TransitionVMToBlocked transition(thread); |
zra
2016/01/08 23:32:07
I think I'm a little confused by the meaning of th
siva
2016/01/12 21:26:22
True this was a hack I did initially to get things
|
MonitorLocker ml(old_space_->tasks_lock()); |
ml.Notify(); |
} |