diff --git a/Base/res/icons/16x16/inspector-object-red.png b/Base/res/icons/16x16/inspector-object-red.png new file mode 100644 index 00000000000..c73803f4901 Binary files /dev/null and b/Base/res/icons/16x16/inspector-object-red.png differ diff --git a/DevTools/ProfileViewer/ProfileModel.cpp b/DevTools/ProfileViewer/ProfileModel.cpp index f2caf8362db..427023cdb43 100644 --- a/DevTools/ProfileViewer/ProfileModel.cpp +++ b/DevTools/ProfileViewer/ProfileModel.cpp @@ -7,7 +7,8 @@ ProfileModel::ProfileModel(Profile& profile) : m_profile(profile) { - m_frame_icon.set_bitmap_for_size(16, GraphicsBitmap::load_from_file("/res/icons/16x16/inspector-object.png")); + m_user_frame_icon.set_bitmap_for_size(16, GraphicsBitmap::load_from_file("/res/icons/16x16/inspector-object.png")); + m_kernel_frame_icon.set_bitmap_for_size(16, GraphicsBitmap::load_from_file("/res/icons/16x16/inspector-object-red.png")); } ProfileModel::~ProfileModel() @@ -90,8 +91,11 @@ GVariant ProfileModel::data(const GModelIndex& index, Role role) const { auto* node = static_cast(index.internal_data()); if (role == Role::Icon) { - if (index.column() == Column::StackFrame) - return m_frame_icon; + if (index.column() == Column::StackFrame) { + if (node->address() < (8 * MB)) + return m_kernel_frame_icon; + return m_user_frame_icon; + } return {}; } if (role == Role::Display) { diff --git a/DevTools/ProfileViewer/ProfileModel.h b/DevTools/ProfileViewer/ProfileModel.h index cb64d1bdb80..05a746ef966 100644 --- a/DevTools/ProfileViewer/ProfileModel.h +++ b/DevTools/ProfileViewer/ProfileModel.h @@ -33,5 +33,7 @@ private: explicit ProfileModel(Profile&); Profile& m_profile; - GIcon m_frame_icon; + + GIcon m_user_frame_icon; + GIcon m_kernel_frame_icon; };