Chromium Code Reviews| 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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1018 #if V8_HOST_ARCH_IA32 | 1018 #if V8_HOST_ARCH_IA32 |
| 1019 sample->pc = reinterpret_cast<Address>(mcontext.gregs[REG_EIP]); | 1019 sample->pc = reinterpret_cast<Address>(mcontext.gregs[REG_EIP]); |
| 1020 sample->sp = reinterpret_cast<Address>(mcontext.gregs[REG_ESP]); | 1020 sample->sp = reinterpret_cast<Address>(mcontext.gregs[REG_ESP]); |
| 1021 sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_EBP]); | 1021 sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_EBP]); |
| 1022 #elif V8_HOST_ARCH_X64 | 1022 #elif V8_HOST_ARCH_X64 |
| 1023 sample->pc = reinterpret_cast<Address>(mcontext.gregs[REG_RIP]); | 1023 sample->pc = reinterpret_cast<Address>(mcontext.gregs[REG_RIP]); |
| 1024 sample->sp = reinterpret_cast<Address>(mcontext.gregs[REG_RSP]); | 1024 sample->sp = reinterpret_cast<Address>(mcontext.gregs[REG_RSP]); |
| 1025 sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_RBP]); | 1025 sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_RBP]); |
| 1026 #elif V8_HOST_ARCH_ARM | 1026 #elif V8_HOST_ARCH_ARM |
| 1027 // An undefined macro evaluates to 0, so this applies to Android's Bionic also. | 1027 // An undefined macro evaluates to 0, so this applies to Android's Bionic also. |
| 1028 #if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) | 1028 #if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) && \ |
| 1029 (__UCLIBC__ != 1)) | |
|
digit1
2012/07/13 08:33:22
fwiw, I'm working on a similar patch for Android (
remi.duraffort
2012/07/16 08:43:23
uClibc does defines __GLIBC__ for compatibility re
| |
| 1029 sample->pc = reinterpret_cast<Address>(mcontext.gregs[R15]); | 1030 sample->pc = reinterpret_cast<Address>(mcontext.gregs[R15]); |
| 1030 sample->sp = reinterpret_cast<Address>(mcontext.gregs[R13]); | 1031 sample->sp = reinterpret_cast<Address>(mcontext.gregs[R13]); |
| 1031 sample->fp = reinterpret_cast<Address>(mcontext.gregs[R11]); | 1032 sample->fp = reinterpret_cast<Address>(mcontext.gregs[R11]); |
| 1032 #else | 1033 #else |
| 1033 sample->pc = reinterpret_cast<Address>(mcontext.arm_pc); | 1034 sample->pc = reinterpret_cast<Address>(mcontext.arm_pc); |
| 1034 sample->sp = reinterpret_cast<Address>(mcontext.arm_sp); | 1035 sample->sp = reinterpret_cast<Address>(mcontext.arm_sp); |
| 1035 sample->fp = reinterpret_cast<Address>(mcontext.arm_fp); | 1036 sample->fp = reinterpret_cast<Address>(mcontext.arm_fp); |
| 1036 #endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) | 1037 #endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) |
| 1037 #elif V8_HOST_ARCH_MIPS | 1038 #elif V8_HOST_ARCH_MIPS |
| 1038 sample->pc = reinterpret_cast<Address>(mcontext.pc); | 1039 sample->pc = reinterpret_cast<Address>(mcontext.pc); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1279 | 1280 |
| 1280 | 1281 |
| 1281 void Sampler::Stop() { | 1282 void Sampler::Stop() { |
| 1282 ASSERT(IsActive()); | 1283 ASSERT(IsActive()); |
| 1283 SignalSender::RemoveActiveSampler(this); | 1284 SignalSender::RemoveActiveSampler(this); |
| 1284 SetActive(false); | 1285 SetActive(false); |
| 1285 } | 1286 } |
| 1286 | 1287 |
| 1287 | 1288 |
| 1288 } } // namespace v8::internal | 1289 } } // namespace v8::internal |
| OLD | NEW |