summaryrefslogtreecommitdiff
path: root/Userland/Applications/SystemMonitor
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-07-14 15:14:08 +0300
committerAndreas Kling <kling@serenityos.org>2022-07-14 23:27:46 +0200
commit1c499e75bd25d66393aa2118144d7f0afccc2eed (patch)
treec57925ac5109ed9e970d9e6e76fe5e46753ac32d /Userland/Applications/SystemMonitor
parented9b2a85edfb042bba1297c77be9d7b52422b0ce (diff)
downloadserenity-1c499e75bd25d66393aa2118144d7f0afccc2eed.zip
Kernel+Userland: Remove supervisor pages concept
There's no real value in separating physical pages to supervisor and user types, so let's remove the concept and just let everyone to use "user" physical pages which can be allocated from any PhysicalRegion we want to use. Later on, we will remove the "user" prefix as this prefix is not needed anymore.
Diffstat (limited to 'Userland/Applications/SystemMonitor')
-rw-r--r--Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp9
-rw-r--r--Userland/Applications/SystemMonitor/MemoryStatsWidget.h1
2 files changed, 2 insertions, 8 deletions
diff --git a/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp b/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp
index 0b162e5bb8..fd42ac1d3a 100644
--- a/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp
+++ b/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp
@@ -62,7 +62,6 @@ MemoryStatsWidget::MemoryStatsWidget(GraphWidget* graph)
m_user_physical_pages_label = build_widgets_for_label("Physical memory:");
m_user_physical_pages_committed_label = build_widgets_for_label("Committed memory:");
- m_supervisor_physical_pages_label = build_widgets_for_label("Supervisor physical:");
m_kmalloc_space_label = build_widgets_for_label("Kernel heap:");
m_kmalloc_count_label = build_widgets_for_label("Calls kmalloc:");
m_kfree_count_label = build_widgets_for_label("Calls kfree:");
@@ -120,23 +119,19 @@ void MemoryStatsWidget::refresh()
u64 user_physical_available = json.get("user_physical_available"sv).to_u64();
u64 user_physical_committed = json.get("user_physical_committed"sv).to_u64();
u64 user_physical_uncommitted = json.get("user_physical_uncommitted"sv).to_u64();
- u64 super_physical_alloc = json.get("super_physical_allocated"sv).to_u64();
- u64 super_physical_free = json.get("super_physical_available"sv).to_u64();
u32 kmalloc_call_count = json.get("kmalloc_call_count"sv).to_u32();
u32 kfree_call_count = json.get("kfree_call_count"sv).to_u32();
u64 kmalloc_bytes_total = kmalloc_allocated + kmalloc_available;
u64 user_physical_pages_total = user_physical_allocated + user_physical_available;
- u64 supervisor_pages_total = super_physical_alloc + super_physical_free;
- u64 physical_pages_total = user_physical_pages_total + supervisor_pages_total;
- u64 physical_pages_in_use = user_physical_allocated + super_physical_alloc;
+ u64 physical_pages_total = user_physical_pages_total;
+ u64 physical_pages_in_use = user_physical_allocated;
u64 total_userphysical_and_swappable_pages = user_physical_allocated + user_physical_committed + user_physical_uncommitted;
m_kmalloc_space_label->set_text(String::formatted("{}/{}", human_readable_size(kmalloc_allocated), human_readable_size(kmalloc_bytes_total)));
m_user_physical_pages_label->set_text(String::formatted("{}/{}", human_readable_size(page_count_to_bytes(physical_pages_in_use)), human_readable_size(page_count_to_bytes(physical_pages_total))));
m_user_physical_pages_committed_label->set_text(String::formatted("{}", human_readable_size(page_count_to_bytes(user_physical_committed))));
- m_supervisor_physical_pages_label->set_text(String::formatted("{}/{}", human_readable_size(page_count_to_bytes(super_physical_alloc)), human_readable_size(page_count_to_bytes(supervisor_pages_total))));
m_kmalloc_count_label->set_text(String::formatted("{}", kmalloc_call_count));
m_kfree_count_label->set_text(String::formatted("{}", kfree_call_count));
m_kmalloc_difference_label->set_text(String::formatted("{:+}", kmalloc_call_count - kfree_call_count));
diff --git a/Userland/Applications/SystemMonitor/MemoryStatsWidget.h b/Userland/Applications/SystemMonitor/MemoryStatsWidget.h
index c384a5c74f..9e5564b202 100644
--- a/Userland/Applications/SystemMonitor/MemoryStatsWidget.h
+++ b/Userland/Applications/SystemMonitor/MemoryStatsWidget.h
@@ -36,7 +36,6 @@ private:
String m_graph_widget_name {};
RefPtr<GUI::Label> m_user_physical_pages_label;
RefPtr<GUI::Label> m_user_physical_pages_committed_label;
- RefPtr<GUI::Label> m_supervisor_physical_pages_label;
RefPtr<GUI::Label> m_kmalloc_space_label;
RefPtr<GUI::Label> m_kmalloc_count_label;
RefPtr<GUI::Label> m_kfree_count_label;