Changeset 34778 in webkit for trunk/JavaScriptCore/profiler/Profile.cpp
- Timestamp:
- Jun 24, 2008, 2:22:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profile.cpp
r34712 r34778 100 100 return; 101 101 102 for (ProfileNode* currentParent = currentNode->parent(); currentParent; currentParent = currentParent->parent()) 103 currentParent->setTotalTime(currentParent->totalTime() - currentNode->totalTime()); 104 102 // Attribute the time of the node aobut to be removed to the self time of its parent 103 currentNode->parent()->setSelfTime(currentNode->parent()->selfTime() + currentNode->totalTime()); 104 105 ASSERT(currentNode->callIdentifier() == (currentNode->parent()->children()[0])->callIdentifier()); 105 106 currentNode->parent()->removeChild(0); 106 107 } … … 115 116 return; 116 117 117 for (ProfileNode* currentParent = currentNode->parent(); currentParent; currentParent = currentParent->parent()) 118 currentParent->setTotalTime(currentParent->totalTime() - currentNode->totalTime()); 119 118 // Attribute the time of the node aobut to be removed to the self time of its parent 119 currentNode->parent()->setSelfTime(currentNode->parent()->selfTime() + currentNode->totalTime()); 120 121 ASSERT(currentNode->callIdentifier() == (currentNode->parent()->children()[currentNode->parent()->children().size() - 1])->callIdentifier()); 120 122 currentNode->parent()->removeChild(currentNode->parent()->children().size() - 1); 121 123 } … … 139 141 m_currentNode->setStartTime(m_head->startTime()); 140 142 m_currentNode->didExecute(); 141 m_head->insertNode(m_currentNode.get());142 143 143 144 if (m_stoppedProfiling) { 144 m_currentNode->setTotalTime(m_currentNode->totalTime() + m_head->selfTime()); 145 m_currentNode->setTotalTime(m_head->totalTime()); 146 m_currentNode->setSelfTime(m_head->selfTime()); 145 147 m_head->setSelfTime(0.0); 146 m_currentNode->stopProfiling();147 m_currentNode = 0; 148 } else149 m_currentNode =m_head;148 } 149 150 m_head->insertNode(m_currentNode.release()); 151 m_currentNode = m_stoppedProfiling ? 0 : m_head; 150 152 151 153 return;
Note:
See TracChangeset
for help on using the changeset viewer.