summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-29 12:28:32 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-29 12:28:32 +0100
commit0d5e0e4cad512ebdcebc1c9a9171c412fcabbd3b (patch)
treea2de0fd9c829c96cd564413cae634319fb227ff8 /Kernel/FileSystem
parentffbe975ffc0e1a442247c5ff0a62b89aad9ac0a5 (diff)
downloadserenity-0d5e0e4cad512ebdcebc1c9a9171c412fcabbd3b.zip
Kernel+SystemMonitor: Expose amount of per-process dirty private memory
Dirty private memory is all memory in non-inode-backed mappings that's process-private, meaning it's not shared with any other process. This patch exposes that number via SystemMonitor, giving us an idea of how much memory each process is responsible for all on its own.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/ProcFS.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp
index 8740b44943..00aacacfaf 100644
--- a/Kernel/FileSystem/ProcFS.cpp
+++ b/Kernel/FileSystem/ProcFS.cpp
@@ -275,6 +275,7 @@ Optional<KBuffer> procfs$pid_vm(InodeIdentifier identifier)
region_object.add("address", region.vaddr().get());
region_object.add("size", (u32)region.size());
region_object.add("amount_resident", (u32)region.amount_resident());
+ region_object.add("amount_dirty", (u32)region.amount_dirty());
region_object.add("cow_pages", region.cow_pages());
region_object.add("name", region.name());
}
@@ -752,6 +753,7 @@ Optional<KBuffer> procfs$all(InodeIdentifier)
process_object.add("tty", process.tty() ? process.tty()->tty_name() : "notty");
process_object.add("amount_virtual", (u32)process.amount_virtual());
process_object.add("amount_resident", (u32)process.amount_resident());
+ process_object.add("amount_dirty_private", (u32)process.amount_dirty_private());
process_object.add("amount_shared", (u32)process.amount_shared());
process_object.add("amount_purgeable_volatile", (u32)process.amount_purgeable_volatile());
process_object.add("amount_purgeable_nonvolatile", (u32)process.amount_purgeable_nonvolatile());