Changeset 33941 in webkit for trunk/JavaScriptCore/profiler/Profile.cpp
- Timestamp:
- May 20, 2008, 1:59:16 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profile.cpp
r33581 r33941 41 41 // FIXME: When multi-threading is supported this will be a vector and calls 42 42 // into the profiler will need to know which thread it is executing on. 43 m_callTree = ProfileNode::create( "Thread_1");43 m_callTree = ProfileNode::create(CallIdentifier("Thread_1", 0, 0)); 44 44 } 45 45 46 // The call StackNames are in order of bottom of the stack to top of the stack so we iterate it backwards.47 void Profile::willExecute(const Vector< UString>& callStackNames)46 // The callIdentifiers are in order of bottom of the stack to top of the stack so we iterate it backwards. 47 void Profile::willExecute(const Vector<CallIdentifier>& callIdentifiers) 48 48 { 49 49 RefPtr<ProfileNode> callTreeInsertionPoint; 50 50 RefPtr<ProfileNode> foundNameInTree = m_callTree; 51 51 52 int i = call StackNames.size();52 int i = callIdentifiers.size(); 53 53 while (foundNameInTree && i) { 54 54 callTreeInsertionPoint = foundNameInTree; 55 foundNameInTree = callTreeInsertionPoint->findChild(call StackNames[--i]);55 foundNameInTree = callTreeInsertionPoint->findChild(callIdentifiers[--i]); 56 56 } 57 57 58 58 if (!foundNameInTree) { // Insert remains of the stack into the call tree. 59 59 for (RefPtr<ProfileNode> next; i >= 0; callTreeInsertionPoint = next) { 60 next = ProfileNode::create(call StackNames[i--]);60 next = ProfileNode::create(callIdentifiers[i--]); 61 61 callTreeInsertionPoint->addChild(next); 62 62 } … … 65 65 } 66 66 67 void Profile::didExecute(const Vector< UString>& stackNames)67 void Profile::didExecute(const Vector<CallIdentifier>& callIdentifiers) 68 68 { 69 ASSERT(stackNames.size()); 70 if (!stackNames.size()) 69 if (!callIdentifiers.size()) 71 70 return; 72 71 73 m_callTree->didExecute( stackNames, stackNames.size() - 1);72 m_callTree->didExecute(callIdentifiers, callIdentifiers.size() - 1); 74 73 } 75 74
Note:
See TracChangeset
for help on using the changeset viewer.