Changeset 34392 in webkit for trunk/JavaScriptCore/profiler/Profile.cpp
- Timestamp:
- Jun 5, 2008, 5:33:28 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profile.cpp
r34362 r34392 46 46 // FIXME: When multi-threading is supported this will be a vector and calls 47 47 // into the profiler will need to know which thread it is executing on. 48 m_head Node= ProfileNode::create(CallIdentifier("Thread_1", 0, 0), 0, 0);49 m_currentNode = m_head Node;48 m_head = ProfileNode::create(CallIdentifier("Thread_1", 0, 0), 0, 0); 49 m_currentNode = m_head; 50 50 } 51 51 … … 54 54 m_currentNode = 0; 55 55 m_originatingGlobalExec = 0; 56 m_head Node->stopProfiling();56 m_head->stopProfiling(); 57 57 m_depth = 0; 58 58 } … … 74 74 // when returning up the stack it needs to insert the calls it missed on the 75 75 // way down. 76 if (m_currentNode == m_head Node) {77 m_currentNode = ProfileNode::create(callIdentifier, m_head Node.get(), m_headNode.get());78 m_currentNode->setStartTime(m_head Node->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()); 79 79 m_currentNode->didExecute(); 80 m_head Node->insertNode(m_currentNode.release());81 m_currentNode = m_head Node;80 m_head->insertNode(m_currentNode.release()); 81 m_currentNode = m_head; 82 82 return; 83 83 } … … 87 87 } 88 88 89 void Profile:: sort(SortFunction function) {89 void Profile::forEach(UnaryFunction function) { 90 90 91 ProfileNode* currentNode = m_head Node->firstChild();91 ProfileNode* currentNode = m_head->firstChild(); 92 92 for (ProfileNode* nextNode = currentNode; nextNode; nextNode = nextNode->firstChild()) 93 93 currentNode = nextNode; 94 94 95 ProfileNode* endNode = m_head Node->traverseNextNode();95 ProfileNode* endNode = m_head->traverseNextNode(); 96 96 while (currentNode && currentNode != endNode) { 97 function(currentNode);98 currentNode = currentNode->traverseNextNode();97 function(currentNode); 98 currentNode = currentNode->traverseNextNode(); 99 99 } 100 100 } … … 104 104 { 105 105 printf("Call graph:\n"); 106 m_head Node->debugPrintData(0);106 m_head->debugPrintData(0); 107 107 } 108 108 … … 120 120 FunctionCallHashCount countedFunctions; 121 121 printf("Call graph:\n"); 122 m_head Node->debugPrintDataSampleStyle(0, countedFunctions);122 m_head->debugPrintDataSampleStyle(0, countedFunctions); 123 123 124 124 printf("\nTotal number in stack:\n");
Note:
See TracChangeset
for help on using the changeset viewer.