1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

Profiler: Move ELF object name to its own profile graph column

This way you don't have to look at all the library names if you don't
want to. Since we're pretty good about namespacing our things, the
library names are slightly redundant information.
This commit is contained in:
Andreas Kling 2021-02-27 17:45:41 +01:00
parent 2f0ea9ae33
commit 340180ba05
4 changed files with 43 additions and 24 deletions

View file

@ -100,6 +100,8 @@ String ProfileModel::column_name(int column) const
return m_profile.show_percentages() ? "% Samples" : "# Samples";
case Column::SelfCount:
return m_profile.show_percentages() ? "% Self" : "# Self";
case Column::ObjectName:
return "Object";
case Column::StackFrame:
return "Stack Frame";
default:
@ -134,6 +136,8 @@ GUI::Variant ProfileModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
return ((float)node->self_count() / (float)m_profile.filtered_event_count()) * 100.0f;
return node->self_count();
}
if (index.column() == Column::ObjectName)
return node->object_name();
if (index.column() == Column::StackFrame)
return node->symbol();
return {};