Changeset 33382 in webkit for trunk/JavaScriptCore/profiler/FunctionCallProfile.h
- Timestamp:
- May 13, 2008, 12:35:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/FunctionCallProfile.h
r32760 r33382 32 32 #include <kjs/ustring.h> 33 33 #include <wtf/Deque.h> 34 #include <wtf/RefCounted.h> 35 #include <wtf/RefPtr.h> 34 36 #include <wtf/StrHash.h> 35 37 … … 38 40 class FunctionCallProfile; 39 41 40 typedef Deque< FunctionCallProfile*>::const_iterator StackIterator;42 typedef Deque<RefPtr<FunctionCallProfile> >::const_iterator StackIterator; 41 43 typedef HashCountedSet<UString::Rep*> FunctionCallHashCount; 42 44 43 class FunctionCallProfile {45 class FunctionCallProfile : public RefCounted<FunctionCallProfile> { 44 46 public: 45 FunctionCallProfile(const UString& name); 46 ~FunctionCallProfile(); 47 static PassRefPtr<FunctionCallProfile> create(const UString& name) { return adoptRef(new FunctionCallProfile(name)); } 47 48 48 49 void willExecute(); 49 50 void didExecute(Vector<UString> stackNames, unsigned int stackIndex); 50 51 51 void addChild( FunctionCallProfile*child);52 void addChild(RefPtr<FunctionCallProfile>& child); 52 53 FunctionCallProfile* findChild(const UString& name); 53 54 … … 57 58 double milliSecs() const { return m_timeSum; } 58 59 unsigned numberOfCalls() const { return m_numberOfCalls; } 60 const Deque<RefPtr<FunctionCallProfile> >& children() { return m_children; } 59 61 60 62 void printDataInspectorStyle(int indentLevel) const; … … 62 64 63 65 private: 66 FunctionCallProfile(const UString& name); 67 64 68 void endAndRecordCall(); 65 69 … … 69 73 unsigned m_numberOfCalls; 70 74 71 Deque< FunctionCallProfile*> m_children;75 Deque<RefPtr<FunctionCallProfile> > m_children; 72 76 }; 73 77
Note:
See TracChangeset
for help on using the changeset viewer.