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

Unified Diff: runtime/vm/profiler.cc

Issue 1293253005: Completely remove InterruptableThreadState and Fix ThreadRegistry leak (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index e9ad1ccfa0de04fc67062c904699b5e00d6f3dba..9e42856dad656d21f36aaa974a75b3cab707776c 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -169,7 +169,8 @@ void Profiler::BeginExecution(Isolate* isolate) {
if (profiler_data == NULL) {
return;
}
- ThreadInterrupter::Register(RecordSampleInterruptCallback, isolate);
+ Thread* thread = Thread::Current();
+ thread->SetThreadInterrupter(RecordSampleInterruptCallback, isolate);
Ivan Posva 2015/08/20 18:00:10 How often does the first value change while a proc
Cutch 2015/08/20 20:40:18 Aside from tests it never changes.
ThreadInterrupter::WakeUp();
}
@@ -182,7 +183,8 @@ void Profiler::EndExecution(Isolate* isolate) {
return;
}
ASSERT(initialized_);
- ThreadInterrupter::Unregister();
+ Thread* thread = Thread::Current();
+ thread->SetThreadInterrupter(NULL, NULL);
}

Powered by Google App Engine
This is Rietveld 408576698