Commit c08b11db authored by ager@chromium.org's avatar ager@chromium.org

Land change by Alexander Botero-Lowry to fix profiler sampling on

FreeBSD in 64-bit mode.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3da53e3e
......@@ -554,14 +554,18 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
// Extracting the sample from the context is extremely machine dependent.
ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
mcontext_t& mcontext = ucontext->uc_mcontext;
#if defined (__arm__) || defined(__thumb__)
sample.pc = mcontext.mc_r15;
sample.sp = mcontext.mc_r13;
sample.fp = mcontext.mc_r11;
#else
#if V8_HOST_ARCH_IA32
sample.pc = mcontext.mc_eip;
sample.sp = mcontext.mc_esp;
sample.fp = mcontext.mc_ebp;
#elif V8_HOST_ARCH_X64
sample.pc = mcontext.mc_rip;
sample.sp = mcontext.mc_rsp;
sample.fp = mcontext.mc_rbp;
#elif V8_HOST_ARCH_ARM
sample.pc = mcontext.mc_r15;
sample.sp = mcontext.mc_r13;
sample.fp = mcontext.mc_r11;
#endif
active_sampler_->SampleStack(&sample);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment