]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - profiler/ProfileGenerator.h
JavaScriptCore-7600.1.4.11.8.tar.gz
[apple/javascriptcore.git] / profiler / ProfileGenerator.h
index cccb502d43d2ae28ce2e366a2c1af86b4dae3cd4..03de0699cc6a190ee6d875c9b7045901bd2bfa5e 100644 (file)
 
 namespace JSC {
 
-    class CallIdentifier;
     class ExecState;
+    class JSGlobalObject;
     class Profile;
     class ProfileNode;
-    class UString;
+    struct CallIdentifier;    
 
     class ProfileGenerator : public RefCounted<ProfileGenerator>  {
     public:
-        static PassRefPtr<ProfileGenerator> create(const UString& title, ExecState* originatingExec, unsigned uid);
+        static PassRefPtr<ProfileGenerator> create(ExecState*, const WTF::String& title, unsigned uid);
 
         // Members
-        const UString& title() const;
+        const WTF::String& title() const;
         PassRefPtr<Profile> profile() const { return m_profile; }
-        ExecState* originatingGlobalExec() const { return m_originatingGlobalExec; }
+        JSGlobalObject* origin() const { return m_origin; }
         unsigned profileGroup() const { return m_profileGroup; }
 
         // Collecting
-        void willExecute(const CallIdentifier&);
-        void didExecute(const CallIdentifier&);
+        void willExecute(ExecState* callerCallFrame, const CallIdentifier&);
+        void didExecute(ExecState* callerCallFrame, const CallIdentifier&);
+
+        void exceptionUnwind(ExecState* handlerCallFrame, const CallIdentifier&);
 
         // Stopping Profiling
         void stopProfiling();
 
-        typedef void (ProfileGenerator::*ProfileFunction)(const CallIdentifier& callIdentifier);
+        typedef void (ProfileGenerator::*ProfileFunction)(ExecState* callerOrHandlerCallFrame, const CallIdentifier& callIdentifier);
 
     private:
-        ProfileGenerator(const UString& title, ExecState* originatingExec, unsigned uid);
+        ProfileGenerator(ExecState*, const WTF::String& title, unsigned uid);
         void addParentForConsoleStart(ExecState*);
 
         void removeProfileStart();
         void removeProfileEnd();
 
         RefPtr<Profile> m_profile;
-        ExecState* m_originatingGlobalExec;
+        JSGlobalObject* m_origin;
         unsigned m_profileGroup;
         RefPtr<ProfileNode> m_head;
         RefPtr<ProfileNode> m_currentNode;
+        bool m_foundConsoleStartParent;
     };
 
 } // namespace JSC