| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 typedef struct ucontext { | 988 typedef struct ucontext { |
| 989 uint32_t uc_flags; | 989 uint32_t uc_flags; |
| 990 struct ucontext* uc_link; | 990 struct ucontext* uc_link; |
| 991 stack_t uc_stack; | 991 stack_t uc_stack; |
| 992 mcontext_t uc_mcontext; | 992 mcontext_t uc_mcontext; |
| 993 __sigset_t uc_sigmask; | 993 __sigset_t uc_sigmask; |
| 994 } ucontext_t; | 994 } ucontext_t; |
| 995 | 995 |
| 996 #elif !defined(__GLIBC__) && defined(__i386__) | 996 #elif !defined(__GLIBC__) && defined(__i386__) |
| 997 // x86 version for Android. | 997 // x86 version for Android. |
| 998 struct _libc_fpreg { | 998 struct sigcontext { |
| 999 uint16_t significand[4]; | 999 uint32_t gregs[19]; |
| 1000 uint16_t exponent; | 1000 void* fpregs; |
| 1001 uint32_t oldmask; |
| 1002 uint32_t cr2; |
| 1001 }; | 1003 }; |
| 1002 | 1004 |
| 1003 struct _libc_fpstate { | 1005 typedef uint32_t __sigset_t; |
| 1004 uint64_t cw; | 1006 typedef struct sigcontext mcontext_t; |
| 1005 uint64_t sw; | |
| 1006 uint64_t tag; | |
| 1007 uint64_t ipoff; | |
| 1008 uint64_t cssel; | |
| 1009 uint64_t dataoff; | |
| 1010 uint64_t datasel; | |
| 1011 struct _libc_fpreg _st[8]; | |
| 1012 uint64_t status; | |
| 1013 }; | |
| 1014 | |
| 1015 typedef struct _libc_fpstate *fpregset_t; | |
| 1016 | |
| 1017 typedef struct mcontext { | |
| 1018 int32_t gregs[19]; | |
| 1019 fpregset_t fpregs; | |
| 1020 int64_t oldmask; | |
| 1021 int64_t cr2; | |
| 1022 } mcontext_t; | |
| 1023 | |
| 1024 typedef uint64_t __sigset_t; | |
| 1025 | |
| 1026 typedef struct ucontext { | 1007 typedef struct ucontext { |
| 1027 uint64_t uc_flags; | 1008 uint32_t uc_flags; |
| 1028 struct ucontext *uc_link; | 1009 struct ucontext* uc_link; |
| 1029 stack_t uc_stack; | 1010 stack_t uc_stack; |
| 1030 mcontext_t uc_mcontext; | 1011 mcontext_t uc_mcontext; |
| 1031 __sigset_t uc_sigmask; | 1012 __sigset_t uc_sigmask; |
| 1032 struct _libc_fpstate __fpregs_mem; | |
| 1033 } ucontext_t; | 1013 } ucontext_t; |
| 1034 | |
| 1035 enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 }; | 1014 enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 }; |
| 1036 #endif | 1015 #endif |
| 1037 | 1016 |
| 1038 | 1017 |
| 1039 static int GetThreadID() { | 1018 static int GetThreadID() { |
| 1040 // Glibc doesn't provide a wrapper for gettid(2). | 1019 // Glibc doesn't provide a wrapper for gettid(2). |
| 1041 #if defined(ANDROID) | 1020 #if defined(ANDROID) |
| 1042 return syscall(__NR_gettid); | 1021 return syscall(__NR_gettid); |
| 1043 #else | 1022 #else |
| 1044 return syscall(SYS_gettid); | 1023 return syscall(SYS_gettid); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 | 1276 |
| 1298 | 1277 |
| 1299 void Sampler::Stop() { | 1278 void Sampler::Stop() { |
| 1300 ASSERT(IsActive()); | 1279 ASSERT(IsActive()); |
| 1301 SignalSender::RemoveActiveSampler(this); | 1280 SignalSender::RemoveActiveSampler(this); |
| 1302 SetActive(false); | 1281 SetActive(false); |
| 1303 } | 1282 } |
| 1304 | 1283 |
| 1305 | 1284 |
| 1306 } } // namespace v8::internal | 1285 } } // namespace v8::internal |
| OLD | NEW |