Ignore:
Timestamp:
May 14, 2008, 5:25:48 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

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

Reviewed by Sam.

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

  • Rename FunctionCallProfile to ProfileNode.
  • GNUmakefile.am:
  • JavaScriptCore.exp:
  • JavaScriptCore.pri:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • JavaScriptCoreSources.bkl:
  • profiler/FunctionCallProfile.cpp: Removed.
  • profiler/FunctionCallProfile.h: Removed.
  • profiler/Profile.cpp: (KJS::Profile::Profile): (KJS::Profile::willExecute):
  • profiler/Profile.h: (KJS::Profile::callTree):
  • profiler/ProfileNode.cpp: Copied from profiler/FunctionCallProfile.cpp. (KJS::ProfileNode::ProfileNode): (KJS::ProfileNode::willExecute): (KJS::ProfileNode::didExecute): (KJS::ProfileNode::addChild): (KJS::ProfileNode::findChild): (KJS::ProfileNode::stopProfiling): (KJS::ProfileNode::selfTime): (KJS::ProfileNode::printDataInspectorStyle): (KJS::ProfileNode::printDataSampleStyle): (KJS::ProfileNode::endAndRecordCall):
  • profiler/ProfileNode.h: Copied from profiler/FunctionCallProfile.h. (KJS::ProfileNode::create): (KJS::ProfileNode::children):
  • profiler/Profiler.cpp:

WebCore:

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

Reviewed by Sam.

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

  • Rename FunctionCallProfile to ProfileNode
  • ForwardingHeaders/profiler/FunctionCallProfile.h: Removed.
  • ForwardingHeaders/profiler/ProfileNode.h: Copied from ForwardingHeaders/profiler/FunctionCallProfile.h.
  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:
  • page/JavaScriptFunctionCallProfile.cpp: Removed.
  • page/JavaScriptFunctionCallProfile.h: Removed.
  • page/JavaScriptProfile.cpp:
  • page/JavaScriptProfileNode.cpp: Copied from page/JavaScriptFunctionCallProfile.cpp. (WebCore::ProfileNodeCache): (WebCore::getFunctionName): (WebCore::getTotalTime): (WebCore::getSelfTime): (WebCore::getNumberOfCalls): (WebCore::getChildren): (WebCore::finalize): (WebCore::ProfileNodeClass): (WebCore::toJS):
  • page/JavaScriptProfileNode.h: Copied from page/JavaScriptFunctionCallProfile.h.
File:
1 moved

Legend:

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

    r33464 r33466  
    2828
    2929#include "config.h"
    30 #include "FunctionCallProfile.h"
     30#include "ProfileNode.h"
    3131
    3232#include "Profiler.h"
     
    3737namespace KJS {
    3838
    39 FunctionCallProfile::FunctionCallProfile(const UString& name)
     39ProfileNode::ProfileNode(const UString& name)
    4040    : m_functionName(name)
    4141    , m_timeSum(0)
     
    4545}
    4646
    47 void FunctionCallProfile::willExecute()
     47void ProfileNode::willExecute()
    4848{
    4949    m_startTime = getCurrentUTCTime();
    5050}
    5151
    52 void FunctionCallProfile::didExecute(Vector<UString> stackNames, unsigned int stackIndex)
     52void ProfileNode::didExecute(Vector<UString> stackNames, unsigned int stackIndex)
    5353{
    5454    if (stackIndex && stackIndex == stackNames.size()) {
     
    6666}
    6767
    68 void FunctionCallProfile::addChild(PassRefPtr<FunctionCallProfile> prpChild)
     68void ProfileNode::addChild(PassRefPtr<ProfileNode> prpChild)
    6969{
    7070    ASSERT(prpChild);
    7171
    72     RefPtr<FunctionCallProfile> child = prpChild;
     72    RefPtr<ProfileNode> child = prpChild;
    7373    for (StackIterator currentChild = m_children.begin(); currentChild != m_children.end(); ++currentChild) {
    7474        if ((*currentChild)->functionName() == child->functionName())
     
    7979}
    8080
    81 FunctionCallProfile* FunctionCallProfile::findChild(const UString& name)
     81ProfileNode* ProfileNode::findChild(const UString& name)
    8282{
    8383    for (StackIterator currentChild = m_children.begin(); currentChild != m_children.end(); ++currentChild) {
     
    8989}
    9090
    91 void FunctionCallProfile::stopProfiling()
     91void ProfileNode::stopProfiling()
    9292{
    9393    if (m_startTime)
     
    9999}
    100100
    101 double FunctionCallProfile::selfTime() const
     101double ProfileNode::selfTime() const
    102102{
    103103    double sumChildrenTime = 0.0;
     
    111111}
    112112
    113 void FunctionCallProfile::printDataInspectorStyle(int indentLevel) const
     113void ProfileNode::printDataInspectorStyle(int indentLevel) const
    114114{
    115115    // Print function names
     
    130130
    131131// print the profiled data in a format that matches the tool sample's output.
    132 double FunctionCallProfile::printDataSampleStyle(int indentLevel, FunctionCallHashCount& countedFunctions) const
     132double ProfileNode::printDataSampleStyle(int indentLevel, FunctionCallHashCount& countedFunctions) const
    133133{
    134134    printf("    ");
     
    167167}
    168168
    169 void FunctionCallProfile::endAndRecordCall()
     169void ProfileNode::endAndRecordCall()
    170170{
    171171    m_timeSum += getCurrentUTCTime() - m_startTime;
Note: See TracChangeset for help on using the changeset viewer.