| Index: runtime/vm/thread_interrupter_linux.cc
|
| diff --git a/runtime/vm/thread_interrupter_linux.cc b/runtime/vm/thread_interrupter_linux.cc
|
| index ee6b4a7569ea7f6f57d416a2f8194b069ed590fa..f898fcc3abaf5aa58efa5d96f4e6cb5cff0b2fcb 100644
|
| --- a/runtime/vm/thread_interrupter_linux.cc
|
| +++ b/runtime/vm/thread_interrupter_linux.cc
|
| @@ -20,8 +20,7 @@ class ThreadInterrupterLinux : public AllStatic {
|
| if (signal != SIGPROF) {
|
| return;
|
| }
|
| - ThreadInterrupter::ThreadState* state =
|
| - ThreadInterrupter::CurrentThreadState();
|
| + InterruptableThreadState* state = ThreadInterrupter::CurrentThreadState();
|
| if ((state == NULL) || (state->callback == NULL)) {
|
| // No interrupter state or callback.
|
| return;
|
| @@ -40,16 +39,12 @@ class ThreadInterrupterLinux : public AllStatic {
|
| };
|
|
|
|
|
| -void ThreadInterrupter::InterruptThreads(int64_t current_time) {
|
| - for (intptr_t i = 0; i < threads_size_; i++) {
|
| - ThreadState* state = threads_[i];
|
| - ASSERT(state->id != Thread::kInvalidThreadId);
|
| - if (FLAG_trace_thread_interrupter) {
|
| - OS::Print("ThreadInterrupter interrupting %p\n",
|
| - reinterpret_cast<void*>(state->id));
|
| - }
|
| - pthread_kill(state->id, SIGPROF);
|
| +void ThreadInterrupter::InterruptThread(InterruptableThreadState* state) {
|
| + if (FLAG_trace_thread_interrupter) {
|
| + OS::Print("ThreadInterrupter interrupting %p\n",
|
| + reinterpret_cast<void*>(state->id));
|
| }
|
| + pthread_kill(state->id, SIGPROF);
|
| }
|
|
|
|
|
|
|