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

Unified Diff: runtime/vm/thread_interrupter_win.cc

Issue 2682343002: Disable the profiler when a debugger is attached (Closed)
Patch Set: vegorov review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/thread_interrupter_macos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_interrupter_win.cc
diff --git a/runtime/vm/thread_interrupter_win.cc b/runtime/vm/thread_interrupter_win.cc
index bcbcc778b7a135f4cbedbda0725e623c0f693c81..964a405d8d4b232738f3c8443de433b226d6e694 100644
--- a/runtime/vm/thread_interrupter_win.cc
+++ b/runtime/vm/thread_interrupter_win.cc
@@ -63,8 +63,8 @@ class ThreadInterrupterWin : public AllStatic {
DWORD result = SuspendThread(handle);
if (result == kThreadError) {
if (FLAG_trace_thread_interrupter) {
- OS::Print("ThreadInterrupter failed to suspend thread %p\n",
- reinterpret_cast<void*>(os_thread->id()));
+ OS::PrintErr("ThreadInterrupter failed to suspend thread %p\n",
+ reinterpret_cast<void*>(os_thread->id()));
}
CloseHandle(handle);
return;
@@ -74,8 +74,8 @@ class ThreadInterrupterWin : public AllStatic {
// Failed to get thread registers.
ResumeThread(handle);
if (FLAG_trace_thread_interrupter) {
- OS::Print("ThreadInterrupter failed to get registers for %p\n",
- reinterpret_cast<void*>(os_thread->id()));
+ OS::PrintErr("ThreadInterrupter failed to get registers for %p\n",
+ reinterpret_cast<void*>(os_thread->id()));
}
CloseHandle(handle);
return;
@@ -93,15 +93,20 @@ class ThreadInterrupterWin : public AllStatic {
};
+bool ThreadInterrupter::IsDebuggerAttached() {
+ return false;
+}
+
+
void ThreadInterrupter::InterruptThread(OSThread* thread) {
if (FLAG_trace_thread_interrupter) {
- OS::Print("ThreadInterrupter suspending %p\n",
- reinterpret_cast<void*>(thread->id()));
+ OS::PrintErr("ThreadInterrupter suspending %p\n",
+ reinterpret_cast<void*>(thread->id()));
}
ThreadInterrupterWin::Interrupt(thread);
if (FLAG_trace_thread_interrupter) {
- OS::Print("ThreadInterrupter resuming %p\n",
- reinterpret_cast<void*>(thread->id()));
+ OS::PrintErr("ThreadInterrupter resuming %p\n",
+ reinterpret_cast<void*>(thread->id()));
}
}
« no previous file with comments | « runtime/vm/thread_interrupter_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698