From e4267020c4212fdead8b044b294c7daafab70ce9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 14 Dec 2019 15:46:18 +0100 Subject: [PATCH] ProfileViewer: Show kernel frames with a red icon :^) --- Base/res/icons/16x16/inspector-object-red.png | Bin 0 -> 196 bytes DevTools/ProfileViewer/ProfileModel.cpp | 10 +++++++--- DevTools/ProfileViewer/ProfileModel.h | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 Base/res/icons/16x16/inspector-object-red.png 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 0000000000000000000000000000000000000000..c73803f4901e8bafe15a9d4944fd113eeff3a662 GIT binary patch literal 196 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`-JULvAr_~T6BZc$;6G}?sBCw3 z`nNY}2|#e6xbW!8X%i=;NgPP!P&Sc+TjJ7@(coQl(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 cb64d1bdb8..05a746ef96 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; };