Changeset 34060 in webkit for trunk/JavaScriptCore
- Timestamp:
- May 22, 2008, 11:57:44 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r34054 r34060 1 2008-05-22 Kevin McCullough <[email protected]> 2 3 Reviewed by Adam. 4 5 Fix a bug in the profiler where time in the current function is given to 6 (idle). 7 8 * profiler/Profile.cpp: 9 (KJS::Profile::didExecute): Set the start time and then call didExecute 10 to calculate the time spent in this function. 11 * profiler/ProfileNode.cpp: Remove confusing calculations that are no 12 longer necessary. 13 (KJS::ProfileNode::insertNode): 14 * profiler/ProfileNode.h: Expose access to the start time to allow the 15 simpler time calculations above. 16 (KJS::ProfileNode::startTime): 17 (KJS::ProfileNode::setStartTime): 18 1 19 2008-05-22 Adam Roben <[email protected]> 2 20 -
trunk/JavaScriptCore/profiler/Profile.cpp
r34043 r34060 65 65 if (m_currentNode == m_headNode) { 66 66 m_currentNode = ProfileNode::create(callIdentifier, m_headNode.get(), m_headNode.get()); 67 m_currentNode->setStartTime(m_headNode->startTime()); 68 m_currentNode->didExecute(); 67 69 m_headNode->insertNode(m_currentNode.release()); 68 70 m_currentNode = m_headNode; -
trunk/JavaScriptCore/profiler/ProfileNode.cpp
r34048 r34060 105 105 RefPtr<ProfileNode> node = prpNode; 106 106 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) 110 108 node->addChild(m_children[i].release()); 111 }112 109 113 110 m_children.clear(); 114 115 node->didExecute();116 node->setTotalTime(sumOfChildrensTime);117 node->setSelfTime(0.0);118 111 m_children.append(node.release()); 119 112 } -
trunk/JavaScriptCore/profiler/ProfileNode.h
r34043 r34060 74 74 unsigned lineNumber() const { return m_callIdentifier.lineNumber; } 75 75 76 double startTime() const { return m_startTime; } 77 void setStartTime(double startTime) { m_startTime = startTime; } 76 78 double totalTime() const { return m_visibleTotalTime; } 77 79 void setTotalTime(double time) { m_actualTotalTime = time; m_visibleTotalTime = time; }
Note:
See TracChangeset
for help on using the changeset viewer.