mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
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:
parent
aaf3c393ab
commit
6d3bb00887
|
@ -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_...
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue