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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1412733008: Switch profiler from isolates to threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index a3c3134c89e032b9817f45008ababb177251371b..4d09f85cbc14dfd057a054961f3e4886a3b427b8 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1463,25 +1463,21 @@ DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) {
}
-DART_EXPORT void Dart_IsolateBlocked() {
- Isolate* isolate = Isolate::Current();
- CHECK_ISOLATE(isolate);
- IsolateProfilerData* profiler_data = isolate->profiler_data();
- if (profiler_data == NULL) {
+DART_EXPORT void Dart_ThreadDisableProfiling() {
+ Thread* T = Thread::Current();
+ if (T == NULL) {
return;
}
- profiler_data->Block();
+ T->DisableThreadInterrupts();
}
-DART_EXPORT void Dart_IsolateUnblocked() {
- Isolate* isolate = Isolate::Current();
- CHECK_ISOLATE(isolate);
- IsolateProfilerData* profiler_data = isolate->profiler_data();
- if (profiler_data == NULL) {
+DART_EXPORT void Dart_ThreadEnableProfiling() {
+ Thread* T = Thread::Current();
+ if (T == NULL) {
return;
}
- profiler_data->Unblock();
+ T->EnableThreadInterrupts();
}

Powered by Google App Engine
This is Rietveld 408576698