OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 typedef uint32_t kernel_sigset_t[2]; // x86 kernel uses 64-bit signal masks | 153 typedef uint32_t kernel_sigset_t[2]; // x86 kernel uses 64-bit signal masks |
154 typedef struct ucontext { | 154 typedef struct ucontext { |
155 uint32_t uc_flags; | 155 uint32_t uc_flags; |
156 struct ucontext* uc_link; | 156 struct ucontext* uc_link; |
157 stack_t uc_stack; | 157 stack_t uc_stack; |
158 mcontext_t uc_mcontext; | 158 mcontext_t uc_mcontext; |
159 // Other fields are not used by V8, don't define them here. | 159 // Other fields are not used by V8, don't define them here. |
160 } ucontext_t; | 160 } ucontext_t; |
161 enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 }; | 161 enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 }; |
| 162 |
| 163 #elif defined(__x86_64__) |
| 164 // x64 version for Android. |
| 165 typedef struct { |
| 166 uint64_t gregs[23]; |
| 167 void* fpregs; |
| 168 uint64_t __reserved1[8]; |
| 169 } mcontext_t; |
| 170 |
| 171 typedef struct ucontext { |
| 172 uint64_t uc_flags; |
| 173 struct ucontext *uc_link; |
| 174 stack_t uc_stack; |
| 175 mcontext_t uc_mcontext; |
| 176 // Other fields are not used by V8, don't define them here. |
| 177 } ucontext_t; |
| 178 enum { REG_RBP = 10, REG_RSP = 15, REG_RIP = 16 }; |
162 #endif | 179 #endif |
163 | 180 |
164 #endif // V8_OS_ANDROID && !defined(__BIONIC_HAVE_UCONTEXT_T) | 181 #endif // V8_OS_ANDROID && !defined(__BIONIC_HAVE_UCONTEXT_T) |
165 | 182 |
166 | 183 |
167 namespace v8 { | 184 namespace v8 { |
168 namespace internal { | 185 namespace internal { |
169 | 186 |
170 namespace { | 187 namespace { |
171 | 188 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 #endif // USE_SIMULATOR | 750 #endif // USE_SIMULATOR |
734 SampleStack(state); | 751 SampleStack(state); |
735 } | 752 } |
736 ResumeThread(profiled_thread); | 753 ResumeThread(profiled_thread); |
737 } | 754 } |
738 | 755 |
739 #endif // USE_SIGNALS | 756 #endif // USE_SIGNALS |
740 | 757 |
741 | 758 |
742 } } // namespace v8::internal | 759 } } // namespace v8::internal |
OLD | NEW |