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

Unified Diff: runtime/vm/profiler.cc

Issue 84993005: Always update scheduled thread id (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index a6e53a7fb64832d7a1e2410b2c0a790f9402de8b..6ebe829103c80d7e52d29bf9af09abee0b4085bb 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -171,11 +171,6 @@ void ProfilerManager::ShutdownIsolateForProfiling(Isolate* isolate) {
void ProfilerManager::ScheduleIsolateHelper(Isolate* isolate) {
ScopedMonitor lock(monitor_);
- intptr_t i = FindIsolate(isolate);
- if (i >= 0) {
- // Already scheduled.
- return;
- }
{
ScopedMutex profiler_data_lock(isolate->profiler_data_mutex());
IsolateProfilerData* profiler_data = isolate->profiler_data();
@@ -185,6 +180,11 @@ void ProfilerManager::ScheduleIsolateHelper(Isolate* isolate) {
profiler_data->Scheduled(OS::GetCurrentTimeMicros(),
Thread::GetCurrentThreadId());
}
+ intptr_t i = FindIsolate(isolate);
+ if (i >= 0) {
+ // Already scheduled.
+ return;
+ }
AddIsolate(isolate);
lock.Notify();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698