diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-25 19:20:41 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:30:55 +0000 |
commit | 6882a04fb36642862b11efe514251d32070c3d65 (patch) | |
tree | b7959826000b061fd5ccc7512035c7478742f7b0 /Source/JavaScriptCore/tools/CodeProfile.cpp | |
parent | ab6df191029eeeb0b0f16f127d553265659f739e (diff) | |
download | qtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz |
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/JavaScriptCore/tools/CodeProfile.cpp')
-rw-r--r-- | Source/JavaScriptCore/tools/CodeProfile.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/tools/CodeProfile.cpp b/Source/JavaScriptCore/tools/CodeProfile.cpp index de86e52ef..c64f1d5a6 100644 --- a/Source/JavaScriptCore/tools/CodeProfile.cpp +++ b/Source/JavaScriptCore/tools/CodeProfile.cpp @@ -33,7 +33,7 @@ #include <wtf/Vector.h> #include <wtf/text/WTFString.h> -#if PLATFORM(MAC) +#if OS(DARWIN) #include <cxxabi.h> #include <dlfcn.h> #include <execinfo.h> @@ -56,7 +56,7 @@ const char* CodeProfile::s_codeTypeNames[CodeProfile::NumberOfCodeTypes] = { // Helper function, find the symbol name for a pc in JSC. static const char* symbolName(void* address) { -#if PLATFORM(MAC) +#if OS(DARWIN) Dl_info info; if (!dladdr(address, &info) || !info.dli_sname) return "<unknown>"; @@ -74,7 +74,7 @@ static const char* symbolName(void* address) static bool truncateTrace(const char* symbolName) { return !strcmp(symbolName, "JSC::BytecodeGenerator::generate()") - || !strcmp(symbolName, "JSC::Parser<JSC::Lexer<unsigned char> >::parseInner()") + || !strcmp(symbolName, "JSC::Parser<JSC::Lexer<unsigned char>>::parseInner()") || !strcmp(symbolName, "WTF::fastMalloc(unsigned long)") || !strcmp(symbolName, "WTF::calculateUTCOffset()") || !strcmp(symbolName, "JSC::DFG::ByteCodeParser::parseCodeBlock()"); @@ -105,9 +105,9 @@ void CodeProfile::sample(void* pc, void** framePointer) type = RegExpCode; else { CodeBlock* codeBlock = static_cast<CodeBlock*>(ownerUID); - if (codeBlock->getJITType() == JITCode::DFGJIT) + if (codeBlock->jitType() == JITCode::DFGJIT) type = DFGJIT; - else if (codeBlock->canCompileWithDFGState() != DFG::CanCompile) + else if (!canCompile(codeBlock->capabilityLevelState())) type = BaselineOnly; else if (codeBlock->replacement()) type = BaselineOSR; @@ -123,7 +123,7 @@ void CodeProfile::sample(void* pc, void** framePointer) if (type != EngineFrame) return; -#if PLATFORM(MAC) && CPU(X86_64) +#if OS(DARWIN) && CPU(X86_64) // Walk up the stack. pc = framePointer[1]; framePointer = reinterpret_cast<void**>(*framePointer); @@ -143,7 +143,7 @@ void CodeProfile::sample(void* pc, void** framePointer) void CodeProfile::report() { - dataLogF("<CodeProfiling %s:%d>\n", m_file.data(), m_lineNo); + dataLogF("<CodeProfiling %s:%d>\n", m_file.data(), m_lineNumber); // How many frames of C-code to print - 0, if not verbose, 1 if verbose, up to 1024 if very verbose. unsigned recursionLimit = CodeProfiling::beVeryVerbose() ? 1024 : CodeProfiling::beVerbose(); @@ -186,7 +186,7 @@ void CodeProfile::report() for (size_t i = 0 ; i < m_children.size(); ++i) m_children[i]->report(); - dataLogF("</CodeProfiling %s:%d>\n", m_file.data(), m_lineNo); + dataLogF("</CodeProfiling %s:%d>\n", m_file.data(), m_lineNumber); } } |