Skip to content

Commit

Permalink
Always update scheduled thread id
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmccutchan@google.com committed Nov 25, 2013
1 parent d7aece9 commit 9cf8644
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runtime/vm/profiler.cc
Expand Up @@ -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();
Expand All @@ -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();
}
Expand Down

0 comments on commit 9cf8644

Please sign in to comment.