Changeset 34036 in webkit for trunk/JavaScriptCore/profiler/Profiler.cpp
- Timestamp:
- May 22, 2008, 3:09:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profiler.cpp
r34013 r34036 44 44 static const char* AnonymousFunction = "(anonymous function)"; 45 45 46 static void getCallIdentifiers(ExecState*, Vector<CallIdentifier>& callIdentifiers);47 46 static CallIdentifier createCallIdentifier(JSObject*); 48 47 static CallIdentifier createCallIdentifier(const UString& sourceURL, int startingLineNumber); … … 78 77 RefPtr<Profile> profile = Profile::create(title, globalExec, exec->lexicalGlobalObject()->pageGroupIdentifier()); 79 78 m_currentProfiles.append(profile); 80 81 // Update the profile with the current call identifiers that started the profiling.82 Vector<CallIdentifier> callIdentifiers;83 getCallIdentifiers(exec, callIdentifiers);84 for (unsigned i = 0; i< callIdentifiers.size(); ++i)85 profile->willExecute(callIdentifiers[i]);86 79 } 87 80 … … 161 154 } 162 155 163 void getCallIdentifiers(ExecState*, Vector<CallIdentifier>&)164 {165 ASSERT_NOT_REACHED();166 #if 0167 for (ExecState* currentState = exec; currentState; currentState = currentState->callingExecState()) {168 if (FunctionImp* functionImp = currentState->function())169 getCallIdentifierFromFunctionImp(functionImp, callIdentifiers);170 else if (ScopeNode* scopeNode = currentState->scopeNode())171 callIdentifiers.append(CallIdentifier(GlobalCodeExecution, scopeNode->sourceURL(), (scopeNode->lineNo() + 1)) ); // FIXME: Why is the line number always off by one?172 }173 #endif174 }175 176 156 CallIdentifier createCallIdentifier(JSObject* calledFunction) 177 157 {
Note:
See TracChangeset
for help on using the changeset viewer.