diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/tools/CodeProfiling.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/tools/CodeProfiling.cpp')
-rw-r--r-- | Source/JavaScriptCore/tools/CodeProfiling.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/tools/CodeProfiling.cpp b/Source/JavaScriptCore/tools/CodeProfiling.cpp index 302b5f929..740595e3e 100644 --- a/Source/JavaScriptCore/tools/CodeProfiling.cpp +++ b/Source/JavaScriptCore/tools/CodeProfiling.cpp @@ -33,7 +33,7 @@ #include <signal.h> #endif -#if OS(LINUX) || OS(DARWIN) +#if OS(LINUX) #include <sys/time.h> #endif @@ -48,7 +48,7 @@ WTF::MetaAllocatorTracker* CodeProfiling::s_tracker = 0; #pragma clang diagnostic ignored "-Wmissing-noreturn" #endif -#if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) +#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) // Helper function to start & stop the timer. // Presently we're using the wall-clock timer, since this seems to give the best results. static void setProfileTimer(unsigned usec) @@ -66,7 +66,7 @@ static void setProfileTimer(unsigned usec) #pragma clang diagnostic pop #endif -#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64) +#if PLATFORM(MAC) && CPU(X86_64) static void profilingTimer(int, siginfo_t*, void* uap) { mcontext_t context = static_cast<ucontext_t*>(uap)->uc_mcontext; @@ -92,6 +92,7 @@ void CodeProfiling::sample(void* pc, void** framePointer) void CodeProfiling::notifyAllocator(WTF::MetaAllocator* allocator) { +#if !OS(WINCE) // Check for JSC_CODE_PROFILING. const char* codeProfilingMode = getenv("JSC_CODE_PROFILING"); if (!codeProfilingMode) @@ -118,6 +119,7 @@ void CodeProfiling::notifyAllocator(WTF::MetaAllocator* allocator) ASSERT(!s_tracker); s_tracker = new WTF::MetaAllocatorTracker(); allocator->trackAllocations(s_tracker); +#endif } void* CodeProfiling::getOwnerUIDForPC(void* address) @@ -141,7 +143,7 @@ void CodeProfiling::begin(const SourceCode& source) if (alreadyProfiling) return; -#if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) +#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) // Regsiter a signal handler & itimer. struct sigaction action; action.sa_sigaction = reinterpret_cast<void (*)(int, siginfo_t *, void *)>(profilingTimer); @@ -165,7 +167,7 @@ void CodeProfiling::end() if (s_profileStack) return; -#if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) +#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) // Stop profiling setProfileTimer(0); #endif |