X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/profiler/Profile.h?ds=inline diff --git a/profiler/Profile.h b/profiler/Profile.h index 8984eaf..41cb670 100644 --- a/profiler/Profile.h +++ b/profiler/Profile.h @@ -35,38 +35,30 @@ namespace JSC { class JS_EXPORT_PRIVATE Profile : public RefCounted { public: - static PassRefPtr create(const String& title, unsigned uid); + static Ref create(const String& title, unsigned uid, double); virtual ~Profile(); const String& title() const { return m_title; } unsigned uid() const { return m_uid; } - ProfileNode* head() const { return m_head.get(); } - void setHead(PassRefPtr head) { m_head = head; } - - double totalTime() const { return m_head->totalTime(); } - - double idleTime() const { return m_idleTime; } - void setIdleTime(double idleTime) { m_idleTime = idleTime; } - - void forEach(void (ProfileNode::*)()); + ProfileNode* rootNode() const { return m_rootNode.get(); } + void setRootNode(PassRefPtr rootNode) { m_rootNode = rootNode; } #ifndef NDEBUG - void debugPrintData() const; - void debugPrintDataSampleStyle() const; + void debugPrint(); + void debugPrintSampleStyle(); #endif protected: - Profile(const String& title, unsigned uid); + Profile(const String& title, unsigned uid, double startTime); private: void removeProfileStart(); void removeProfileEnd(); String m_title; - RefPtr m_head; + RefPtr m_rootNode; unsigned m_uid; - double m_idleTime; }; } // namespace JSC