Ignore:
Timestamp:
May 19, 2008, 7:03:14 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-05-19 Kevin McCullough <[email protected]>

Reviewed by Adam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Pass the exec state to profiler when calling startProfiling so that if profiling is started within an execution context that location is recorded correctly.
  • JavaScriptCore.exp:
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::printDataInspectorStyle): Dump more info for debugging purposes.
  • profiler/Profiler.cpp: (KJS::Profiler::startProfiling):
  • profiler/Profiler.h:

WebCore:

2008-05-19 Kevin McCullough <[email protected]>

Reviewed by Adam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Send the executing context to the profiler so it can attribute time correctly to parent functions when calling profile() and profileEnd() while nested.
  • page/Console.cpp: (WebCore::Console::profile): (WebCore::Console::profileEnd):
  • page/Console.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/profiler/ProfileNode.cpp

    r33581 r33593  
    202202{
    203203    // Print function names
    204     if (indentLevel) {
    205         for (int i = 0; i < indentLevel; ++i)
    206             printf("  ");
    207 
    208         printf("%d SelfTime %.3fms %.3f%% TotalTime %.3fms%.3f%% FunctionName %s\n", m_numberOfCalls, m_selfTime, selfPercent(), m_totalTime, totalPercent(), m_functionName.UTF8String().c_str());
    209     } else
    210         printf("%s\n", m_functionName.UTF8String().c_str());
     204    for (int i = 0; i < indentLevel; ++i)
     205        printf("  ");
     206
     207    printf("%d SelfTime %.3fms/%.3f%% TotalTime %.3fms/%.3f%% FunctionName %s\n", m_numberOfCalls, m_selfTime, selfPercent(), m_totalTime, totalPercent(), m_functionName.UTF8String().c_str());
    211208
    212209    ++indentLevel;
Note: See TracChangeset for help on using the changeset viewer.