summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-17 12:14:13 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-17 12:15:46 +0100
commit02f89dc419bd15d5487f91e23a9ae57b5e1dc272 (patch)
tree36c5366e2b76e39a35e35699dc09a016d6efeb12
parent794758df3ace052c1d2f0d90dc99e6154e90be9d (diff)
downloadserenity-02f89dc419bd15d5487f91e23a9ae57b5e1dc272.zip
Kernel+SystemMonitor: Show VM region "shared" and "stack" bits in UI
Expose these two region bits through /proc/PID/vm and show them in the SystemMonitor process memory map view.
-rw-r--r--Applications/SystemMonitor/ProcessMemoryMapWidget.cpp4
-rw-r--r--Kernel/FileSystem/ProcFS.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp b/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
index 9adfd15fe3..a30f7f9d98 100644
--- a/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
+++ b/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
@@ -22,6 +22,10 @@ ProcessMemoryMapWidget::ProcessMemoryMapWidget(GWidget* parent)
builder.append('R');
if (object.get("writable").to_bool())
builder.append('W');
+ if (object.get("shared").to_bool())
+ builder.append('S');
+ if (object.get("stack").to_bool())
+ builder.append('T');
return builder.to_string();
});
pid_vm_fields.empend("name", "Name", TextAlignment::CenterLeft);
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp
index c0fa49903c..bb7a86d7bc 100644
--- a/Kernel/FileSystem/ProcFS.cpp
+++ b/Kernel/FileSystem/ProcFS.cpp
@@ -258,6 +258,8 @@ Optional<KBuffer> procfs$pid_vm(InodeIdentifier identifier)
auto region_object = array.add_object();
region_object.add("readable", region.is_readable());
region_object.add("writable", region.is_writable());
+ region_object.add("stack", region.is_stack());
+ region_object.add("shared", region.is_shared());
region_object.add("address", region.vaddr().get());
region_object.add("size", (u32)region.size());
region_object.add("amount_resident", (u32)region.amount_resident());