]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - profiler/Profile.h
JavaScriptCore-1218.0.1.tar.gz
[apple/javascriptcore.git] / profiler / Profile.h
index dd96f77fc5c18769377fa700f81cf0850aa34a00..c1c69193cc2bc118349909572ce32b1354fc058f 100644 (file)
 #define Profile_h
 
 #include "ProfileNode.h"
-#include <runtime/UString.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
 
 namespace JSC {
 
     class Profile : public RefCounted<Profile> {
     public:
-        static PassRefPtr<Profile> create(const UString& title, unsigned uid);
+        static PassRefPtr<Profile> create(const String& title, unsigned uid);
         virtual ~Profile();
 
-        const UString& title() const { return m_title; }
+        const String& title() const { return m_title; }
         ProfileNode* head() const { return m_head.get(); }
         void setHead(PassRefPtr<ProfileNode> head) { m_head = head; }
         double totalTime() const { return m_head->totalTime(); }
         unsigned int uid() const { return m_uid; }
 
-        void forEach(void (ProfileNode::*)());
-        void sortTotalTimeDescending() { forEach(&ProfileNode::sortTotalTimeDescending); }
-        void sortTotalTimeAscending() { forEach(&ProfileNode::sortTotalTimeAscending); }
-        void sortSelfTimeDescending() { forEach(&ProfileNode::sortSelfTimeDescending); }
-        void sortSelfTimeAscending() { forEach(&ProfileNode::sortSelfTimeAscending); }
-        void sortCallsDescending() { forEach(&ProfileNode::sortCallsDescending); }
-        void sortCallsAscending() { forEach(&ProfileNode::sortCallsAscending); }
-        void sortFunctionNameDescending() { forEach(&ProfileNode::sortFunctionNameDescending); }
-        void sortFunctionNameAscending() { forEach(&ProfileNode::sortFunctionNameAscending); }
+        JS_EXPORT_PRIVATE void forEach(void (ProfileNode::*)());
 
-        void focus(const ProfileNode*);
-        void exclude(const ProfileNode*);
-        void restoreAll();
-
-        virtual Profile* heavyProfile() = 0;
-        virtual Profile* treeProfile() = 0; 
+        JS_EXPORT_PRIVATE void focus(const ProfileNode*);
+        JS_EXPORT_PRIVATE void exclude(const ProfileNode*);
+        JS_EXPORT_PRIVATE void restoreAll();
 
 #ifndef NDEBUG
         void debugPrintData() const;
@@ -67,13 +56,13 @@ namespace JSC {
 #endif
 
     protected:
-        Profile(const UString& title, unsigned uid);
+        Profile(const String& title, unsigned uid);
 
     private:
         void removeProfileStart();
         void removeProfileEnd();
  
-        UString m_title;
+        String m_title;
         RefPtr<ProfileNode> m_head;
         unsigned int m_uid;
     };