Changeset 33466 in webkit for trunk/JavaScriptCore/profiler/ProfileNode.cpp
- Timestamp:
- May 14, 2008, 5:25:48 PM (17 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/ProfileNode.cpp
r33464 r33466 28 28 29 29 #include "config.h" 30 #include " FunctionCallProfile.h"30 #include "ProfileNode.h" 31 31 32 32 #include "Profiler.h" … … 37 37 namespace KJS { 38 38 39 FunctionCallProfile::FunctionCallProfile(const UString& name)39 ProfileNode::ProfileNode(const UString& name) 40 40 : m_functionName(name) 41 41 , m_timeSum(0) … … 45 45 } 46 46 47 void FunctionCallProfile::willExecute()47 void ProfileNode::willExecute() 48 48 { 49 49 m_startTime = getCurrentUTCTime(); 50 50 } 51 51 52 void FunctionCallProfile::didExecute(Vector<UString> stackNames, unsigned int stackIndex)52 void ProfileNode::didExecute(Vector<UString> stackNames, unsigned int stackIndex) 53 53 { 54 54 if (stackIndex && stackIndex == stackNames.size()) { … … 66 66 } 67 67 68 void FunctionCallProfile::addChild(PassRefPtr<FunctionCallProfile> prpChild)68 void ProfileNode::addChild(PassRefPtr<ProfileNode> prpChild) 69 69 { 70 70 ASSERT(prpChild); 71 71 72 RefPtr< FunctionCallProfile> child = prpChild;72 RefPtr<ProfileNode> child = prpChild; 73 73 for (StackIterator currentChild = m_children.begin(); currentChild != m_children.end(); ++currentChild) { 74 74 if ((*currentChild)->functionName() == child->functionName()) … … 79 79 } 80 80 81 FunctionCallProfile* FunctionCallProfile::findChild(const UString& name)81 ProfileNode* ProfileNode::findChild(const UString& name) 82 82 { 83 83 for (StackIterator currentChild = m_children.begin(); currentChild != m_children.end(); ++currentChild) { … … 89 89 } 90 90 91 void FunctionCallProfile::stopProfiling()91 void ProfileNode::stopProfiling() 92 92 { 93 93 if (m_startTime) … … 99 99 } 100 100 101 double FunctionCallProfile::selfTime() const101 double ProfileNode::selfTime() const 102 102 { 103 103 double sumChildrenTime = 0.0; … … 111 111 } 112 112 113 void FunctionCallProfile::printDataInspectorStyle(int indentLevel) const113 void ProfileNode::printDataInspectorStyle(int indentLevel) const 114 114 { 115 115 // Print function names … … 130 130 131 131 // print the profiled data in a format that matches the tool sample's output. 132 double FunctionCallProfile::printDataSampleStyle(int indentLevel, FunctionCallHashCount& countedFunctions) const132 double ProfileNode::printDataSampleStyle(int indentLevel, FunctionCallHashCount& countedFunctions) const 133 133 { 134 134 printf(" "); … … 167 167 } 168 168 169 void FunctionCallProfile::endAndRecordCall()169 void ProfileNode::endAndRecordCall() 170 170 { 171 171 m_timeSum += getCurrentUTCTime() - m_startTime;
Note:
See TracChangeset
for help on using the changeset viewer.