diff options
Diffstat (limited to 'JavaScriptCore/profiler/ProfileNode.h')
| -rw-r--r-- | JavaScriptCore/profiler/ProfileNode.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/JavaScriptCore/profiler/ProfileNode.h b/JavaScriptCore/profiler/ProfileNode.h index 2b5a936..ffe7b6f 100644 --- a/JavaScriptCore/profiler/ProfileNode.h +++ b/JavaScriptCore/profiler/ProfileNode.h @@ -30,36 +30,39 @@ #define ProfileNode_h #include "CallIdentifier.h" -#include <wtf/Vector.h> +#include <wtf/HashCountedSet.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> +#include <wtf/Vector.h> namespace JSC { + class ExecState; class ProfileNode; typedef Vector<RefPtr<ProfileNode> >::const_iterator StackIterator; - typedef HashCountedSet<UString::Rep*> FunctionCallHashCount; + typedef HashCountedSet<StringImpl*> FunctionCallHashCount; class ProfileNode : public RefCounted<ProfileNode> { public: - static PassRefPtr<ProfileNode> create(const CallIdentifier& callIdentifier, ProfileNode* headNode, ProfileNode* parentNode) + static PassRefPtr<ProfileNode> create(ExecState* callerCallFrame, const CallIdentifier& callIdentifier, ProfileNode* headNode, ProfileNode* parentNode) { - return adoptRef(new ProfileNode(callIdentifier, headNode, parentNode)); + return adoptRef(new ProfileNode(callerCallFrame, callIdentifier, headNode, parentNode)); } - static PassRefPtr<ProfileNode> create(ProfileNode* headNode, ProfileNode* node) + static PassRefPtr<ProfileNode> create(ExecState* callerCallFrame, ProfileNode* headNode, ProfileNode* node) { - return adoptRef(new ProfileNode(headNode, node)); + return adoptRef(new ProfileNode(callerCallFrame, headNode, node)); } bool operator==(ProfileNode* node) { return m_callIdentifier == node->callIdentifier(); } - ProfileNode* willExecute(const CallIdentifier&); + ProfileNode* willExecute(ExecState* callerCallFrame, const CallIdentifier&); ProfileNode* didExecute(); void stopProfiling(); // CallIdentifier members + ExecState* callerCallFrame() const { return m_callerCallFrame; } const CallIdentifier& callIdentifier() const { return m_callIdentifier; } const UString& functionName() const { return m_callIdentifier.m_name; } const UString& url() const { return m_callIdentifier.m_url; } @@ -127,8 +130,8 @@ namespace JSC { #endif private: - ProfileNode(const CallIdentifier&, ProfileNode* headNode, ProfileNode* parentNode); - ProfileNode(ProfileNode* headNode, ProfileNode* nodeToCopy); + ProfileNode(ExecState* callerCallFrame, const CallIdentifier&, ProfileNode* headNode, ProfileNode* parentNode); + ProfileNode(ExecState* callerCallFrame, ProfileNode* headNode, ProfileNode* nodeToCopy); void startTimer(); void resetChildrensSiblings(); @@ -146,6 +149,7 @@ namespace JSC { static inline bool functionNameDescendingComparator(const RefPtr<ProfileNode>& a, const RefPtr<ProfileNode>& b) { return a->functionName() > b->functionName(); } static inline bool functionNameAscendingComparator(const RefPtr<ProfileNode>& a, const RefPtr<ProfileNode>& b) { return a->functionName() < b->functionName(); } + ExecState* m_callerCallFrame; CallIdentifier m_callIdentifier; ProfileNode* m_head; ProfileNode* m_parent; |
