Changeset 33382 in webkit for trunk/JavaScriptCore/profiler/Profile.cpp
- Timestamp:
- May 13, 2008, 12:35:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profile.cpp
r33007 r33382 43 43 // FIXME: When multi-threading is supported this will be a vector and calls 44 44 // into the profiler will need to know which thread it is executing on. 45 m_callTree .set(new FunctionCallProfile("Thread_1"));45 m_callTree = FunctionCallProfile::create("Thread_1"); 46 46 } 47 47 48 48 void Profile::willExecute(const Vector<UString>& callStackNames) 49 49 { 50 FunctionCallProfile* callTreeInsertionPoint = 0;51 FunctionCallProfile* foundNameInTree = m_callTree.get();50 RefPtr<FunctionCallProfile> callTreeInsertionPoint; 51 RefPtr<FunctionCallProfile> foundNameInTree = m_callTree; 52 52 NameIterator callStackLocation = callStackNames.begin(); 53 53 … … 60 60 if (!foundNameInTree) { // Insert remains of the stack into the call tree. 61 61 --callStackLocation; 62 for ( FunctionCallProfile*next; callStackLocation != callStackNames.end(); ++callStackLocation) {63 next = new FunctionCallProfile(*callStackLocation);62 for (RefPtr<FunctionCallProfile> next; callStackLocation != callStackNames.end(); ++callStackLocation) { 63 next = FunctionCallProfile::create(*callStackLocation); 64 64 callTreeInsertionPoint->addChild(next); 65 65 callTreeInsertionPoint = next; … … 69 69 } 70 70 71 void Profile::didExecute( Vector<UString>stackNames)71 void Profile::didExecute(const Vector<UString>& stackNames) 72 72 { 73 73 m_callTree->didExecute(stackNames, 0); … … 82 82 typedef pair<UString::Rep*, unsigned> NameCountPair; 83 83 84 static inline bool functionNameCountPairComparator(const NameCountPair a, const NameCountPairb)84 static inline bool functionNameCountPairComparator(const NameCountPair& a, const NameCountPair& b) 85 85 { 86 86 return a.second > b.second;
Note:
See TracChangeset
for help on using the changeset viewer.