#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
-#if PLATFORM(MAC)
+#if OS(DARWIN)
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
// 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>";
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()");
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() == CodeBlock::CompileWithDFGFalse)
+ else if (!canCompile(codeBlock->capabilityLevelState()))
type = BaselineOnly;
else if (codeBlock->replacement())
type = BaselineOSR;
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);
framePointer = 0;
#else
// This platform is not yet supported!
- ASSERT_NOT_REACHED();
+ RELEASE_ASSERT_NOT_REACHED();
#endif
}
void CodeProfile::report()
{
- dataLog("<CodeProfiling %s:%d>\n", m_file.data(), m_lineNo);
+ dataLogF("<CodeProfiling %s:%d>\n", m_file.data(), m_lineNo);
// 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();
}
// Output the profile tree.
- dataLog("Total samples: %lld\n", static_cast<long long>(profile.childCount()));
+ dataLogF("Total samples: %lld\n", static_cast<long long>(profile.childCount()));
profile.dump();
for (size_t i = 0 ; i < m_children.size(); ++i)
m_children[i]->report();
- dataLog("</CodeProfiling %s:%d>\n", m_file.data(), m_lineNo);
+ dataLogF("</CodeProfiling %s:%d>\n", m_file.data(), m_lineNo);
}
}