Changeset 72160 in webkit for trunk/JavaScriptCore/profiler/ProfileGenerator.cpp
- Timestamp:
- Nov 16, 2010, 7:03:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/ProfileGenerator.cpp
r65305 r72160 64 64 65 65 exec->interpreter()->retrieveLastCaller(exec, lineNumber, sourceID, sourceURL, function); 66 m_currentNode = ProfileNode::create( Profiler::createCallIdentifier(exec, function ? function.toThisObject(exec) : 0, sourceURL, lineNumber), m_head.get(), m_head.get());66 m_currentNode = ProfileNode::create(exec, Profiler::createCallIdentifier(exec, function ? function.toThisObject(exec) : 0, sourceURL, lineNumber), m_head.get(), m_head.get()); 67 67 m_head->insertNode(m_currentNode.get()); 68 68 } … … 73 73 } 74 74 75 void ProfileGenerator::willExecute( const CallIdentifier& callIdentifier)75 void ProfileGenerator::willExecute(ExecState* exec, const CallIdentifier& callIdentifier) 76 76 { 77 77 if (JAVASCRIPTCORE_PROFILE_WILL_EXECUTE_ENABLED()) { … … 84 84 return; 85 85 86 ASSERT _ARG(m_currentNode,m_currentNode);87 m_currentNode = m_currentNode->willExecute( callIdentifier);86 ASSERT(m_currentNode); 87 m_currentNode = m_currentNode->willExecute(exec, callIdentifier); 88 88 } 89 89 90 void ProfileGenerator::didExecute( const CallIdentifier& callIdentifier)90 void ProfileGenerator::didExecute(ExecState* exec, const CallIdentifier& callIdentifier) 91 91 { 92 92 if (JAVASCRIPTCORE_PROFILE_DID_EXECUTE_ENABLED()) { … … 99 99 return; 100 100 101 ASSERT _ARG(m_currentNode,m_currentNode);101 ASSERT(m_currentNode); 102 102 if (m_currentNode->callIdentifier() != callIdentifier) { 103 RefPtr<ProfileNode> returningNode = ProfileNode::create( callIdentifier, m_head.get(), m_currentNode.get());103 RefPtr<ProfileNode> returningNode = ProfileNode::create(exec, callIdentifier, m_head.get(), m_currentNode.get()); 104 104 returningNode->setStartTime(m_currentNode->startTime()); 105 105 returningNode->didExecute(); … … 111 111 } 112 112 113 void ProfileGenerator::exceptionUnwind(ExecState* exec, const CallIdentifier&) 114 { 115 ASSERT(m_currentNode); 116 while (m_currentNode->exec() > exec) { 117 didExecute(exec, m_currentNode->callIdentifier()); 118 ASSERT(m_currentNode); 119 } 120 } 121 113 122 void ProfileGenerator::stopProfiling() 114 123 { … … 118 127 removeProfileEnd(); 119 128 120 ASSERT _ARG(m_currentNode,m_currentNode);129 ASSERT(m_currentNode); 121 130 122 131 // Set the current node to the parent, because we are in a call that … … 125 134 126 135 if (double headSelfTime = m_head->selfTime()) { 127 RefPtr<ProfileNode> idleNode = ProfileNode::create( CallIdentifier(NonJSExecution, UString(), 0), m_head.get(), m_head.get());136 RefPtr<ProfileNode> idleNode = ProfileNode::create(0, CallIdentifier(NonJSExecution, UString(), 0), m_head.get(), m_head.get()); 128 137 129 138 idleNode->setTotalTime(headSelfTime);
Note:
See TracChangeset
for help on using the changeset viewer.