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

Unified Diff: runtime/vm/signal_handler_linux.cc

Issue 583683002: Fixes for the profiler on arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/signal_handler_android.cc ('k') | runtime/vm/signal_handler_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/signal_handler_linux.cc
===================================================================
--- runtime/vm/signal_handler_linux.cc (revision 40496)
+++ runtime/vm/signal_handler_linux.cc (working copy)
@@ -20,8 +20,12 @@
pc = static_cast<uintptr_t>(mcontext.gregs[REG_EIP]);
#elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
pc = static_cast<uintptr_t>(mcontext.gregs[REG_EIP]);
+#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
+ pc = static_cast<uintptr_t>(mcontext.gregs[REG_RIP]);
#elif defined(TARGET_ARCH_ARM)
pc = static_cast<uintptr_t>(mcontext.arm_pc);
+#elif defined(TARGET_ARCH_ARM64)
+ pc = static_cast<uintptr_t>(mcontext.pc);
#elif defined(TARGET_ARCH_MIPS)
pc = static_cast<uintptr_t>(mcontext.pc);
#else
@@ -42,8 +46,12 @@
fp = static_cast<uintptr_t>(mcontext.gregs[REG_EBP]);
#elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
fp = static_cast<uintptr_t>(mcontext.gregs[REG_EBP]);
+#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
+ fp = static_cast<uintptr_t>(mcontext.gregs[REG_RBP]);
#elif defined(TARGET_ARCH_ARM)
fp = static_cast<uintptr_t>(mcontext.arm_fp);
+#elif defined(TARGET_ARCH_ARM64)
+ fp = static_cast<uintptr_t>(mcontext.regs[29]);
#elif defined(TARGET_ARCH_MIPS)
fp = static_cast<uintptr_t>(mcontext.gregs[30]);
#else
@@ -54,7 +62,7 @@
}
-uintptr_t SignalHandler::GetStackPointer(const mcontext_t& mcontext) {
+uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
uintptr_t sp = 0;
#if defined(TARGET_ARCH_IA32)
@@ -65,8 +73,12 @@
sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
#elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
+#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
+ sp = static_cast<uintptr_t>(mcontext.gregs[REG_RSP]);
#elif defined(TARGET_ARCH_ARM)
sp = static_cast<uintptr_t>(mcontext.arm_sp);
+#elif defined(TARGET_ARCH_ARM64)
+ sp = static_cast<uintptr_t>(mcontext.sp);
#elif defined(TARGET_ARCH_MIPS)
sp = static_cast<uintptr_t>(mcontext.gregs[29]);
#else
@@ -76,6 +88,15 @@
}
+uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
+#if defined(TARGET_ARCH_ARM64) && !defined(USING_SIMULATOR)
+ return static_cast<uintptr_t>(mcontext.regs[18]);
+#else
+ return GetCStackPointer(mcontext);
+#endif
+}
+
+
void SignalHandler::Install(SignalAction action) {
struct sigaction act;
act.sa_handler = NULL;
« no previous file with comments | « runtime/vm/signal_handler_android.cc ('k') | runtime/vm/signal_handler_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698