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

Side by Side Diff: runtime/vm/signal_handler_macos.cc

Issue 1428893003: Fix profiling on ARM64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #include "vm/simulator.h" 6 #include "vm/simulator.h"
7 #include "vm/signal_handler.h" 7 #include "vm/signal_handler.h"
8 #if defined(TARGET_OS_MACOS) 8 #if defined(TARGET_OS_MACOS)
9 9
10 namespace dart { 10 namespace dart {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 sp = static_cast<uintptr_t>(mcontext->__ss.__sp); 60 sp = static_cast<uintptr_t>(mcontext->__ss.__sp);
61 #else 61 #else
62 UNIMPLEMENTED(); 62 UNIMPLEMENTED();
63 #endif // HOST_ARCH_... 63 #endif // HOST_ARCH_...
64 64
65 return sp; 65 return sp;
66 } 66 }
67 67
68 68
69 uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) { 69 uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
70 #if defined(TARGET_ARCH_ARM64) && !defined(USING_SIMULATOR)
71 return static_cast<uintptr_t>(mcontext->__ss.__x[19]);
72 #else
70 return GetCStackPointer(mcontext); 73 return GetCStackPointer(mcontext);
74 #endif
71 } 75 }
72 76
73 77
74 uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) { 78 uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) {
75 uintptr_t lr = 0; 79 uintptr_t lr = 0;
76 80
77 #if defined(TARGET_ARCH_IA32) 81 #if defined(TARGET_ARCH_IA32)
78 lr = 0; 82 lr = 0;
79 #elif defined(TARGET_ARCH_X64) 83 #elif defined(TARGET_ARCH_X64)
80 lr = 0; 84 lr = 0;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 sigemptyset(&act.sa_mask); 121 sigemptyset(&act.sa_mask);
118 act.sa_flags = 0; 122 act.sa_flags = 0;
119 int r = sigaction(SIGPROF, &act, NULL); 123 int r = sigaction(SIGPROF, &act, NULL);
120 ASSERT(r == 0); 124 ASSERT(r == 0);
121 } 125 }
122 126
123 127
124 } // namespace dart 128 } // namespace dart
125 129
126 #endif // defined(TARGET_OS_MACOS) 130 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« runtime/vm/signal_handler_android.cc ('K') | « runtime/vm/signal_handler_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698