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

Side by Side Diff: runtime/vm/thread_interrupter_win.cc

Issue 2682343002: Disable the profiler when a debugger is attached (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/profiler.h" 10 #include "vm/profiler.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Thread* thread = os_thread->thread(); 86 Thread* thread = os_thread->thread();
87 if (thread != NULL) { 87 if (thread != NULL) {
88 Profiler::SampleThread(thread, its); 88 Profiler::SampleThread(thread, its);
89 } 89 }
90 ResumeThread(handle); 90 ResumeThread(handle);
91 CloseHandle(handle); 91 CloseHandle(handle);
92 } 92 }
93 }; 93 };
94 94
95 95
96 bool ThreadInterrupter::IsDebuggerAttached() {
97 return false;
98 }
99
100
96 void ThreadInterrupter::InterruptThread(OSThread* thread) { 101 void ThreadInterrupter::InterruptThread(OSThread* thread) {
97 if (FLAG_trace_thread_interrupter) { 102 if (FLAG_trace_thread_interrupter) {
98 OS::Print("ThreadInterrupter suspending %p\n", 103 OS::Print("ThreadInterrupter suspending %p\n",
99 reinterpret_cast<void*>(thread->id())); 104 reinterpret_cast<void*>(thread->id()));
100 } 105 }
101 ThreadInterrupterWin::Interrupt(thread); 106 ThreadInterrupterWin::Interrupt(thread);
102 if (FLAG_trace_thread_interrupter) { 107 if (FLAG_trace_thread_interrupter) {
103 OS::Print("ThreadInterrupter resuming %p\n", 108 OS::Print("ThreadInterrupter resuming %p\n",
104 reinterpret_cast<void*>(thread->id())); 109 reinterpret_cast<void*>(thread->id()));
105 } 110 }
106 } 111 }
107 112
108 113
109 void ThreadInterrupter::InstallSignalHandler() { 114 void ThreadInterrupter::InstallSignalHandler() {
110 // Nothing to do on Windows. 115 // Nothing to do on Windows.
111 } 116 }
112 117
113 118
114 void ThreadInterrupter::RemoveSignalHandler() { 119 void ThreadInterrupter::RemoveSignalHandler() {
115 // Nothing to do on Windows. 120 // Nothing to do on Windows.
116 } 121 }
117 122
118 #endif // !PRODUCT 123 #endif // !PRODUCT
119 124
120 } // namespace dart 125 } // namespace dart
121 126
122 #endif // defined(TARGET_OS_WINDOWS) 127 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« runtime/vm/thread_interrupter_macos.cc ('K') | « runtime/vm/thread_interrupter_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698