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

Side by Side Diff: src/platform-win32.cc

Issue 113094: X64: Changed TickSample to hold pointer-sized values for registers. (Closed)
Patch Set: Created 11 years, 7 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
« src/log.cc ('K') | « src/platform-linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 while (sampler_->IsActive()) { 1768 while (sampler_->IsActive()) {
1769 TickSample sample; 1769 TickSample sample;
1770 1770
1771 // If profiling, we record the pc and sp of the profiled thread. 1771 // If profiling, we record the pc and sp of the profiled thread.
1772 if (sampler_->IsProfiling()) { 1772 if (sampler_->IsProfiling()) {
1773 // Pause the profiled thread and get its context. 1773 // Pause the profiled thread and get its context.
1774 SuspendThread(profiled_thread_); 1774 SuspendThread(profiled_thread_);
1775 context.ContextFlags = CONTEXT_FULL; 1775 context.ContextFlags = CONTEXT_FULL;
1776 GetThreadContext(profiled_thread_, &context); 1776 GetThreadContext(profiled_thread_, &context);
1777 // Invoke tick handler with program counter and stack pointer. 1777 // Invoke tick handler with program counter and stack pointer.
1778 #if V8_HOST_ARCH_64_BIT
Dean McNamee 2009/05/07 08:34:08 shouldn't we check for X64 here.
Lasse Reichstein 2009/05/07 09:06:01 No, this is really the host system's registers, no
Dean McNamee 2009/05/07 09:19:06 Yes, we have both V8_HOST_ARCH_X64 and V8_TARGET_A
Lasse Reichstein 2009/05/12 08:17:20 Done.
1779 UNIMPLEMENTED();
William Hesse 2009/05/07 09:27:50 Shouldn't UNIMPLEMENTED() be removed, if this code
William Hesse 2009/05/07 09:27:50 Shouldn't UNIMPLEMENTED() be removed, if this code
1780 sample.pc = context.Rip;
1781 sample.sp = context.Rsp;
1782 sample.fp = context.Rbp;
1783 #else
1778 sample.pc = context.Eip; 1784 sample.pc = context.Eip;
1779 sample.sp = context.Esp; 1785 sample.sp = context.Esp;
1780 sample.fp = context.Ebp; 1786 sample.fp = context.Ebp;
1787 #endif
1781 } 1788 }
1782 1789
1783 // We always sample the VM state. 1790 // We always sample the VM state.
1784 sample.state = Logger::state(); 1791 sample.state = Logger::state();
1785 sampler_->Tick(&sample); 1792 sampler_->Tick(&sample);
1786 1793
1787 if (sampler_->IsProfiling()) { 1794 if (sampler_->IsProfiling()) {
1788 ResumeThread(profiled_thread_); 1795 ResumeThread(profiled_thread_);
1789 } 1796 }
1790 1797
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 1863
1857 // Release the thread handles 1864 // Release the thread handles
1858 CloseHandle(data_->sampler_thread_); 1865 CloseHandle(data_->sampler_thread_);
1859 CloseHandle(data_->profiled_thread_); 1866 CloseHandle(data_->profiled_thread_);
1860 } 1867 }
1861 1868
1862 1869
1863 #endif // ENABLE_LOGGING_AND_PROFILING 1870 #endif // ENABLE_LOGGING_AND_PROFILING
1864 1871
1865 } } // namespace v8::internal 1872 } } // namespace v8::internal
OLDNEW
« src/log.cc ('K') | « src/platform-linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698