1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

ProfileView: Show "self" sample counts in profiles

The "self" sample count is the number of samples that had this specific
frame as its innermost stack frame (leaf nodes in the profile tree.)
This commit is contained in:
Andreas Kling 2020-03-02 21:37:19 +01:00
parent 8e8e8c801c
commit 8effe0b632
4 changed files with 14 additions and 4 deletions

View file

@ -48,6 +48,7 @@ public:
u64 timestamp() const { return m_timestamp; }
u32 event_count() const { return m_event_count; }
u32 self_count() const { return m_self_count; }
int child_count() const { return m_children.size(); }
const Vector<NonnullRefPtr<ProfileNode>>& children() const { return m_children; }
@ -78,6 +79,7 @@ public:
const ProfileNode* parent() const { return m_parent; }
void increment_event_count() { ++m_event_count; }
void increment_self_count() { ++m_self_count; }
void sort_children();
@ -95,6 +97,7 @@ private:
u32 m_address { 0 };
u32 m_offset { 0 };
u32 m_event_count { 0 };
u32 m_self_count { 0 };
u64 m_timestamp { 0 };
Vector<NonnullRefPtr<ProfileNode>> m_children;
};