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

Side by Side Diff: runtime/vm/signal_handler_linux.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_LINUX) 8 #if defined(TARGET_OS_LINUX)
9 9
10 namespace dart { 10 namespace dart {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 sp = static_cast<uintptr_t>(mcontext.gregs[29]); 65 sp = static_cast<uintptr_t>(mcontext.gregs[29]);
66 #else 66 #else
67 #error Unsupported architecture. 67 #error Unsupported architecture.
68 #endif // HOST_ARCH_... 68 #endif // HOST_ARCH_...
69 return sp; 69 return sp;
70 } 70 }
71 71
72 72
73 uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) { 73 uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
74 #if defined(TARGET_ARCH_ARM64) && !defined(USING_SIMULATOR) 74 #if defined(TARGET_ARCH_ARM64) && !defined(USING_SIMULATOR)
75 return static_cast<uintptr_t>(mcontext.regs[18]); 75 return static_cast<uintptr_t>(mcontext.regs[19]);
76 #else 76 #else
77 return GetCStackPointer(mcontext); 77 return GetCStackPointer(mcontext);
78 #endif 78 #endif
79 } 79 }
80 80
81 81
82 uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) { 82 uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) {
83 uintptr_t lr = 0; 83 uintptr_t lr = 0;
84 84
85 #if defined(HOST_ARCH_IA32) 85 #if defined(HOST_ARCH_IA32)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 sigemptyset(&act.sa_mask); 118 sigemptyset(&act.sa_mask);
119 act.sa_flags = 0; 119 act.sa_flags = 0;
120 int r = sigaction(SIGPROF, &act, NULL); 120 int r = sigaction(SIGPROF, &act, NULL);
121 ASSERT(r == 0); 121 ASSERT(r == 0);
122 } 122 }
123 123
124 124
125 } // namespace dart 125 } // namespace dart
126 126
127 #endif // defined(TARGET_OS_LINUX) 127 #endif // defined(TARGET_OS_LINUX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698