Bug 816117 - Part 3: Only get control registers from the profiled thread. r=bgirard
authorBas Schouten <bschouten@mozilla.com>
Sat, 08 Dec 2012 06:15:21 +0100
changeset 115414 33c70f306fd448f5a3c2006a0c140c609c66df04
parent 115413 cdae5d81c8e3985a1dc330442368f657c204a1fd
child 115415 9a27274b6616efc3bde4a02e8b33112bf24185d0
push idunknown
push userunknown
push dateunknown
reviewersbgirard
bugs816117
milestone20.0a1
Bug 816117 - Part 3: Only get control registers from the profiled thread. r=bgirard
tools/profiler/platform-win32.cc
--- a/tools/profiler/platform-win32.cc
+++ b/tools/profiler/platform-win32.cc
@@ -120,17 +120,17 @@ class SamplerThread : public Thread {
 
     // Grab the timestamp before pausing the thread, to avoid deadlocks.
     sample->timestamp = mozilla::TimeStamp::Now();
 
     static const DWORD kSuspendFailed = static_cast<DWORD>(-1);
     if (SuspendThread(profiled_thread) == kSuspendFailed)
       return;
 
-    context.ContextFlags = CONTEXT_FULL;
+    context.ContextFlags = CONTEXT_CONTROL;
     if (GetThreadContext(profiled_thread, &context) != 0) {
 #if V8_HOST_ARCH_X64
       sample->pc = reinterpret_cast<Address>(context.Rip);
       sample->sp = reinterpret_cast<Address>(context.Rsp);
       sample->fp = reinterpret_cast<Address>(context.Rbp);
 #else
       sample->pc = reinterpret_cast<Address>(context.Eip);
       sample->sp = reinterpret_cast<Address>(context.Esp);