mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
Kernel+Userland: Rename prefix of user_physical => physical
There's no such supervisor pages concept, so there's no need to call physical pages with the "user_physical" prefix anymore.
This commit is contained in:
parent
1c499e75bd
commit
e4e5fa74d0
12 changed files with 101 additions and 102 deletions
|
@ -60,8 +60,8 @@ MemoryStatsWidget::MemoryStatsWidget(GraphWidget* graph)
|
|||
return label;
|
||||
};
|
||||
|
||||
m_user_physical_pages_label = build_widgets_for_label("Physical memory:");
|
||||
m_user_physical_pages_committed_label = build_widgets_for_label("Committed memory:");
|
||||
m_physical_pages_label = build_widgets_for_label("Physical memory:");
|
||||
m_physical_pages_committed_label = build_widgets_for_label("Committed memory:");
|
||||
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:");
|
||||
|
@ -115,23 +115,22 @@ void MemoryStatsWidget::refresh()
|
|||
|
||||
u32 kmalloc_allocated = json.get("kmalloc_allocated"sv).to_u32();
|
||||
u32 kmalloc_available = json.get("kmalloc_available"sv).to_u32();
|
||||
u64 user_physical_allocated = json.get("user_physical_allocated"sv).to_u64();
|
||||
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 physical_allocated = json.get("physical_allocated"sv).to_u64();
|
||||
u64 physical_available = json.get("physical_available"sv).to_u64();
|
||||
u64 physical_committed = json.get("physical_committed"sv).to_u64();
|
||||
u64 physical_uncommitted = json.get("physical_uncommitted"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 physical_pages_total = physical_allocated + physical_available;
|
||||
|
||||
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;
|
||||
u64 physical_pages_in_use = physical_allocated;
|
||||
u64 total_userphysical_and_swappable_pages = physical_allocated + physical_committed + 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_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_physical_pages_committed_label->set_text(String::formatted("{}", human_readable_size(page_count_to_bytes(physical_committed))));
|
||||
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));
|
||||
|
@ -143,7 +142,7 @@ void MemoryStatsWidget::refresh()
|
|||
|
||||
if (m_graph) {
|
||||
m_graph->set_max(page_count_to_bytes(total_userphysical_and_swappable_pages) + kmalloc_bytes_total);
|
||||
m_graph->add_value({ page_count_to_bytes(user_physical_committed), page_count_to_bytes(user_physical_allocated), kmalloc_bytes_total });
|
||||
m_graph->add_value({ page_count_to_bytes(physical_committed), page_count_to_bytes(physical_allocated), kmalloc_bytes_total });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue