diff options
author | Andreas Kling <awesomekling@gmail.com> | 2020-01-02 20:50:43 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2020-01-02 20:51:31 +0100 |
commit | efbdaaaa6559d51f1848e9e7963d5f98f288c920 (patch) | |
tree | b74d6addbe659f07958e6fd185625aff75882263 /DevTools | |
parent | 32ec1e5aed6554d3ae2872a0a248bc959578c7e4 (diff) | |
download | serenity-efbdaaaa6559d51f1848e9e7963d5f98f288c920.zip |
ProfileViewer: Interpret addresses >= 0xc0000000 as kernel frames
Diffstat (limited to 'DevTools')
-rw-r--r-- | DevTools/ProfileViewer/Profile.cpp | 3 | ||||
-rw-r--r-- | DevTools/ProfileViewer/ProfileModel.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/DevTools/ProfileViewer/Profile.cpp b/DevTools/ProfileViewer/Profile.cpp index e1fc50ae81..8881a43eee 100644 --- a/DevTools/ProfileViewer/Profile.cpp +++ b/DevTools/ProfileViewer/Profile.cpp @@ -35,7 +35,8 @@ Profile::Profile(const JsonArray& json) if (frames_array.size() < 2) continue; - sample.in_kernel = frames_array.at(1).as_object().get("address").to_number<u32>() < (8 * MB); + u32 innermost_frame_address = frames_array.at(1).as_object().get("address").to_number<u32>(); + sample.in_kernel = innermost_frame_address >= 0xc0000000 || innermost_frame_address < (8 * MB); for (int i = frames_array.size() - 1; i >= 1; --i) { auto& frame_value = frames_array.at(i); diff --git a/DevTools/ProfileViewer/ProfileModel.cpp b/DevTools/ProfileViewer/ProfileModel.cpp index 427023cdb4..02d5dde0d4 100644 --- a/DevTools/ProfileViewer/ProfileModel.cpp +++ b/DevTools/ProfileViewer/ProfileModel.cpp @@ -92,7 +92,7 @@ GVariant ProfileModel::data(const GModelIndex& index, Role role) const auto* node = static_cast<ProfileNode*>(index.internal_data()); if (role == Role::Icon) { if (index.column() == Column::StackFrame) { - if (node->address() < (8 * MB)) + if (node->address() < (8 * MB) || node->address() >= 0xc0000000) return m_kernel_frame_icon; return m_user_frame_icon; } |