Changeset 213886 in webkit for trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp
- Timestamp:
- Mar 14, 2017, 12:33:08 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp
r212464 r213886 28 28 29 29 #include "CodeProfile.h" 30 #include "MachineContext.h" 30 31 #include <wtf/MetaAllocator.h> 31 32 … … 67 68 #endif 68 69 69 #if OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)70 #if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) 70 71 static void profilingTimer(int, siginfo_t*, void* uap) 71 72 { 72 73 mcontext_t context = static_cast<ucontext_t*>(uap)->uc_mcontext; 73 CodeProfiling::sample(reinterpret_cast<void*>(context->__ss.__rip), 74 reinterpret_cast<void**>(context->__ss.__rbp)); 75 } 76 #elif OS(LINUX) && CPU(X86) 77 static void profilingTimer(int, siginfo_t*, void* uap) 78 { 79 mcontext_t context = static_cast<ucontext_t*>(uap)->uc_mcontext; 80 CodeProfiling::sample(reinterpret_cast<void*>(context.gregs[REG_EIP]), 81 reinterpret_cast<void**>(context.gregs[REG_EBP])); 74 CodeProfiling::sample( 75 MachineContext::instructionPointer(context), 76 reinterpret_cast<void**>(MachineContext::framePointer(context))); 82 77 } 83 78 #endif
Note:
See TracChangeset
for help on using the changeset viewer.