Revision: 7141 Author: [email protected] Date: Thu Mar 10 23:34:55 2011 Log: Sample correct registers on solaris.
Landing patch by Ryan Dahl. [email protected] Original review: http://codereview.chromium.org/6676019/ Review URL: http://codereview.chromium.org/6665023 http://code.google.com/p/v8/source/detail?r=7141 Modified: /branches/bleeding_edge/src/platform-solaris.cc ======================================= --- /branches/bleeding_edge/src/platform-solaris.cc Thu Mar 10 17:43:44 2011 +++ /branches/bleeding_edge/src/platform-solaris.cc Thu Mar 10 23:34:55 2011 @@ -45,7 +45,7 @@ #include <errno.h> #include <ieeefp.h> // finite() #include <signal.h> // sigemptyset(), etc -#include <sys/kdi_regs.h> +#include <sys/regset.h> #undef MAP_TYPE @@ -632,17 +632,10 @@ mcontext_t& mcontext = ucontext->uc_mcontext; sample->state = Top::current_vm_state(); -#if V8_HOST_ARCH_IA32 - sample->pc = reinterpret_cast<Address>(mcontext.gregs[KDIREG_EIP]); - sample->sp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_ESP]); - sample->fp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_EBP]); -#elif V8_HOST_ARCH_X64 - sample->pc = reinterpret_cast<Address>(mcontext.gregs[KDIREG_RIP]); - sample->sp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_RSP]); - sample->fp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_RBP]); -#else - UNIMPLEMENTED(); -#endif + sample->pc = reinterpret_cast<Address>(mcontext.gregs[REG_PC]); + sample->sp = reinterpret_cast<Address>(mcontext.gregs[REG_SP]); + sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_FP]); + active_sampler_->SampleStack(sample); active_sampler_->Tick(sample); } -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
