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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 typedef struct sigcontext mcontext_t; | 937 typedef struct sigcontext mcontext_t; |
938 typedef struct ucontext { | 938 typedef struct ucontext { |
939 uint32_t uc_flags; | 939 uint32_t uc_flags; |
940 struct ucontext* uc_link; | 940 struct ucontext* uc_link; |
941 stack_t uc_stack; | 941 stack_t uc_stack; |
942 mcontext_t uc_mcontext; | 942 mcontext_t uc_mcontext; |
943 __sigset_t uc_sigmask; | 943 __sigset_t uc_sigmask; |
944 } ucontext_t; | 944 } ucontext_t; |
945 enum ArmRegisters {R15 = 15, R13 = 13, R11 = 11}; | 945 enum ArmRegisters {R15 = 15, R13 = 13, R11 = 11}; |
946 | 946 |
947 #elif !defined(__GLIBC__) && defined(__mips__) | |
948 struct sigcontext { | |
949 unsigned int regmask; | |
950 unsigned int status; | |
951 unsigned long long pc; | |
952 unsigned long long gregs[32]; | |
953 unsigned long long fpregs[32]; | |
954 unsigned int acx; | |
955 unsigned int fpc_csr; | |
956 unsigned int fpc_eir; | |
957 unsigned int used_math; | |
958 unsigned int dsp; | |
959 unsigned long long mdhi; | |
960 unsigned long long mdlo; | |
961 unsigned long hi1; | |
962 unsigned long lo1; | |
963 unsigned long hi2; | |
964 unsigned long lo2; | |
965 unsigned long hi3; | |
966 unsigned long lo3; | |
967 }; | |
968 typedef uint32_t __sigset_t; | |
969 typedef struct sigcontext mcontext_t; | |
970 typedef struct ucontext { | |
971 uint32_t uc_flags; | |
972 struct ucontext* uc_link; | |
973 stack_t uc_stack; | |
974 mcontext_t uc_mcontext; | |
975 __sigset_t uc_sigmask; | |
976 } ucontext_t; | |
977 | |
978 #endif | 947 #endif |
979 | 948 |
980 | 949 |
981 static int GetThreadID() { | 950 static int GetThreadID() { |
982 // Glibc doesn't provide a wrapper for gettid(2). | 951 // Glibc doesn't provide a wrapper for gettid(2). |
983 #if defined(ANDROID) | 952 #if defined(ANDROID) |
984 return syscall(__NR_gettid); | 953 return syscall(__NR_gettid); |
985 #else | 954 #else |
986 return syscall(SYS_gettid); | 955 return syscall(SYS_gettid); |
987 #endif | 956 #endif |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 | 1208 |
1240 | 1209 |
1241 void Sampler::Stop() { | 1210 void Sampler::Stop() { |
1242 ASSERT(IsActive()); | 1211 ASSERT(IsActive()); |
1243 SignalSender::RemoveActiveSampler(this); | 1212 SignalSender::RemoveActiveSampler(this); |
1244 SetActive(false); | 1213 SetActive(false); |
1245 } | 1214 } |
1246 | 1215 |
1247 | 1216 |
1248 } } // namespace v8::internal | 1217 } } // namespace v8::internal |
OLD | NEW |