Ignore:
Timestamp:
May 22, 2008, 11:57:44 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Adam.

Fix a bug in the profiler where time in the current function is given to
(idle).

  • profiler/Profile.cpp: (KJS::Profile::didExecute): Set the start time and then call didExecute to calculate the time spent in this function.
  • profiler/ProfileNode.cpp: Remove confusing calculations that are no longer necessary. (KJS::ProfileNode::insertNode):
  • profiler/ProfileNode.h: Expose access to the start time to allow the simpler time calculations above. (KJS::ProfileNode::startTime): (KJS::ProfileNode::setStartTime):
File:
1 edited

Legend:

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

    r34048 r34060  
    105105    RefPtr<ProfileNode> node = prpNode;
    106106
    107     double sumOfChildrensTime = 0.0;
    108     for (unsigned i = 0; i < m_children.size(); ++i) {
    109         sumOfChildrensTime += m_children[i]->totalTime();
     107    for (unsigned i = 0; i < m_children.size(); ++i)
    110108        node->addChild(m_children[i].release());
    111     }
    112109
    113110    m_children.clear();
    114 
    115     node->didExecute();
    116     node->setTotalTime(sumOfChildrensTime);
    117     node->setSelfTime(0.0);
    118111    m_children.append(node.release());
    119112}
Note: See TracChangeset for help on using the changeset viewer.