Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Unified Diff: runtime/vm/gc_sweeper.cc

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/gc_sweeper.cc
diff --git a/runtime/vm/gc_sweeper.cc b/runtime/vm/gc_sweeper.cc
index a192138b4c6f5a72ddf92f2360cb4ea8c7ded1e4..0dcf62fb276c7b944f512602fd4847b59aaf6d27 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,14 @@ 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();
+ thread->CheckForSafepoint();
HeapPage* next_page = page->next();
ASSERT(page->type() == HeapPage::kData);
bool page_in_use = sweeper.SweepPage(page, freelist_, false);
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698