Ignore:
Timestamp:
Jun 5, 2008, 5:33:28 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Jon.

  • Name changes.
  • JavaScriptCore.exp:
  • profiler/Profile.cpp: (KJS::Profile::Profile): (KJS::Profile::stopProfiling): (KJS::Profile::didExecute): (KJS::Profile::forEach): (KJS::Profile::debugPrintData): (KJS::Profile::debugPrintDataSampleStyle):
  • profiler/Profile.h: (KJS::Profile::callTree): (KJS::Profile::totalTime): (KJS::Profile::sortTotalTimeDescending): (KJS::Profile::sortTotalTimeAscending): (KJS::Profile::sortSelfTimeDescending): (KJS::Profile::sortSelfTimeAscending): (KJS::Profile::sortCallsDescending): (KJS::Profile::sortCallsAscending): (KJS::Profile::sortFunctionNameDescending): (KJS::Profile::sortFunctionNameAscending): (KJS::Profile::focus): (KJS::Profile::exclude): (KJS::Profile::restoreAll):
File:
1 edited

Legend:

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

    r34362 r34392  
    4646    // FIXME: When multi-threading is supported this will be a vector and calls
    4747    // into the profiler will need to know which thread it is executing on.
    48     m_headNode = ProfileNode::create(CallIdentifier("Thread_1", 0, 0), 0, 0);
    49     m_currentNode = m_headNode;
     48    m_head = ProfileNode::create(CallIdentifier("Thread_1", 0, 0), 0, 0);
     49    m_currentNode = m_head;
    5050}
    5151
     
    5454    m_currentNode = 0;
    5555    m_originatingGlobalExec = 0;
    56     m_headNode->stopProfiling();
     56    m_head->stopProfiling();
    5757    m_depth = 0;
    5858}
     
    7474    // when returning up the stack it needs to insert the calls it missed on the
    7575    // way down.
    76     if (m_currentNode == m_headNode) {
    77         m_currentNode = ProfileNode::create(callIdentifier, m_headNode.get(), m_headNode.get());
    78         m_currentNode->setStartTime(m_headNode->startTime());
     76    if (m_currentNode == m_head) {
     77        m_currentNode = ProfileNode::create(callIdentifier, m_head.get(), m_head.get());
     78        m_currentNode->setStartTime(m_head->startTime());
    7979        m_currentNode->didExecute();
    80         m_headNode->insertNode(m_currentNode.release());
    81         m_currentNode = m_headNode;
     80        m_head->insertNode(m_currentNode.release());
     81        m_currentNode = m_head;
    8282        return;
    8383    }
     
    8787}
    8888
    89 void Profile::sort(SortFunction function) {
     89void Profile::forEach(UnaryFunction function) {
    9090
    91     ProfileNode* currentNode = m_headNode->firstChild();
     91    ProfileNode* currentNode = m_head->firstChild();
    9292    for (ProfileNode* nextNode = currentNode; nextNode; nextNode = nextNode->firstChild())
    9393        currentNode = nextNode;
    9494
    95     ProfileNode* endNode = m_headNode->traverseNextNode();
     95    ProfileNode* endNode = m_head->traverseNextNode();
    9696    while (currentNode && currentNode != endNode) {
    97     function(currentNode);
    98     currentNode = currentNode->traverseNextNode();
     97        function(currentNode);
     98        currentNode = currentNode->traverseNextNode();
    9999    }
    100100}
     
    104104{
    105105    printf("Call graph:\n");
    106     m_headNode->debugPrintData(0);
     106    m_head->debugPrintData(0);
    107107}
    108108
     
    120120    FunctionCallHashCount countedFunctions;
    121121    printf("Call graph:\n");
    122     m_headNode->debugPrintDataSampleStyle(0, countedFunctions);
     122    m_head->debugPrintDataSampleStyle(0, countedFunctions);
    123123
    124124    printf("\nTotal number in stack:\n");
Note: See TracChangeset for help on using the changeset viewer.