X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..8b637bb680022adfddad653280734877951535a9:/profiler/ProfileNode.cpp diff --git a/profiler/ProfileNode.cpp b/profiler/ProfileNode.cpp index 8f20bbe..5b6a254 100644 --- a/profiler/ProfileNode.cpp +++ b/profiler/ProfileNode.cpp @@ -29,9 +29,10 @@ #include "config.h" #include "ProfileNode.h" -#include "Profiler.h" +#include "LegacyProfiler.h" #include #include +#include #include #if OS(WINDOWS) @@ -293,9 +294,9 @@ void ProfileNode::debugPrintData(int indentLevel) const { // Print function names for (int i = 0; i < indentLevel; ++i) - printf(" "); + dataLogF(" "); - printf("Function Name %s %d SelfTime %.3fms/%.3f%% TotalTime %.3fms/%.3f%% VSelf %.3fms VTotal %.3fms Visible %s Next Sibling %s\n", + dataLogF("Function Name %s %d SelfTime %.3fms/%.3f%% TotalTime %.3fms/%.3f%% VSelf %.3fms VTotal %.3fms Visible %s Next Sibling %s\n", functionName().utf8().data(), m_numberOfCalls, m_actualSelfTime, selfPercent(), m_actualTotalTime, totalPercent(), m_visibleSelfTime, m_visibleTotalTime, @@ -312,20 +313,20 @@ void ProfileNode::debugPrintData(int indentLevel) const // print the profiled data in a format that matches the tool sample's output. double ProfileNode::debugPrintDataSampleStyle(int indentLevel, FunctionCallHashCount& countedFunctions) const { - printf(" "); + dataLogF(" "); // Print function names const char* name = functionName().utf8().data(); double sampleCount = m_actualTotalTime * 1000; if (indentLevel) { for (int i = 0; i < indentLevel; ++i) - printf(" "); + dataLogF(" "); countedFunctions.add(functionName().impl()); - printf("%.0f %s\n", sampleCount ? sampleCount : 1, name); + dataLogF("%.0f %s\n", sampleCount ? sampleCount : 1, name); } else - printf("%s\n", name); + dataLogF("%s\n", name); ++indentLevel; @@ -337,11 +338,11 @@ double ProfileNode::debugPrintDataSampleStyle(int indentLevel, FunctionCallHashC sumOfChildrensCount *= 1000; // // Print remainder of samples to match sample's output if (sumOfChildrensCount < sampleCount) { - printf(" "); + dataLogF(" "); while (indentLevel--) - printf(" "); + dataLogF(" "); - printf("%.0f %s\n", sampleCount - sumOfChildrensCount, functionName().utf8().data()); + dataLogF("%.0f %s\n", sampleCount - sumOfChildrensCount, functionName().utf8().data()); } return m_actualTotalTime;