Fix profiling on ARM64.

Linux/Android broken in 91bc8005fe.

iOS was unimplemented.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1428893003 .
This commit is contained in:
Ryan Macnak 2015-10-30 09:26:24 -07:00
parent aaf3c393ab
commit 6d3bb00887
3 changed files with 6 additions and 2 deletions

View file

@ -66,7 +66,7 @@ uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
#elif defined(HOST_ARCH_ARM)
sp = static_cast<uintptr_t>(mcontext.arm_sp);
#elif defined(HOST_ARCH_ARM64)
sp = static_cast<uintptr_t>(mcontext.regs[18]);
sp = static_cast<uintptr_t>(mcontext.regs[19]);
#else
#error Unsupported architecture.
#endif // HOST_ARCH_...

View file

@ -72,7 +72,7 @@ uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
#if defined(TARGET_ARCH_ARM64) && !defined(USING_SIMULATOR)
return static_cast<uintptr_t>(mcontext.regs[18]);
return static_cast<uintptr_t>(mcontext.regs[19]);
#else
return GetCStackPointer(mcontext);
#endif

View file

@ -67,7 +67,11 @@ uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
#if defined(TARGET_ARCH_ARM64) && !defined(USING_SIMULATOR)
return static_cast<uintptr_t>(mcontext->__ss.__x[19]);
#else
return GetCStackPointer(mcontext);
#endif
}