Ignore:
Timestamp:
May 14, 2008, 4:02:57 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

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

Reviewed by John.

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

  • Have each FunctionCallProfile be able to return it's total and self time.
  • JavaScriptCore.exp:
  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::selfTime):
  • profiler/FunctionCallProfile.h: (KJS::FunctionCallProfile::totalTime):

WebCore:

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

Reviewed by John.

-<rdar://problem/5770054> JavaScript profiler (10928)
Use the FunctionCallProfile's new total and self time functions.

  • page/JavaScriptFunctionCallProfile.cpp: (WebCore::getTotalTime): (WebCore::getSelfTime):
File:
1 edited

Legend:

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

    r33388 r33464  
    9999}
    100100
     101double FunctionCallProfile::selfTime() const
     102{
     103    double sumChildrenTime = 0.0;
     104
     105    for (StackIterator currentChild = m_children.begin(); currentChild != m_children.end(); ++currentChild)
     106        sumChildrenTime += (*currentChild)->totalTime();
     107
     108    ASSERT(sumChildrenTime <= m_timeSum);
     109
     110    return m_timeSum - sumChildrenTime;
     111}
     112
    101113void FunctionCallProfile::printDataInspectorStyle(int indentLevel) const
    102114{
Note: See TracChangeset for help on using the changeset viewer.