From 121594ace2731db4f3c86743f483a12276bb798f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 17 Jan 2021 21:16:13 +0100 Subject: Kernel: Remove /proc/PID/vmobjects This file was useful for debugging a long time ago, but has bitrotted at this point. Instead of updating it, let's just remove it since nothing is using it. --- Kernel/FileSystem/ProcFS.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 0f52314a8c..f1f877b3cf 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -112,7 +112,6 @@ enum ProcFileType { __FI_PID_Start, FI_PID_perf_events, FI_PID_vm, - FI_PID_vmobjects, FI_PID_stacks, // directory FI_PID_fds, FI_PID_unveil, @@ -562,40 +561,6 @@ static bool procfs$net_local(InodeIdentifier, KBufferBuilder& builder) return true; } -static bool procfs$pid_vmobjects(InodeIdentifier identifier, KBufferBuilder& builder) -{ - auto process = Process::from_pid(to_pid(identifier)); - if (!process) - return false; - builder.appendf("BEGIN END SIZE NAME\n"); - { - ScopedSpinLock lock(process->get_lock()); - for (auto& region : process->regions()) { - builder.appendf("%x -- %x %x %s\n", - region.vaddr().get(), - region.vaddr().offset(region.size() - 1).get(), - region.size(), - region.name().characters()); - builder.appendf("VMO: %s @ %x(%u)\n", - region.vmobject().is_anonymous() ? "anonymous" : "file-backed", - ®ion.vmobject(), - region.vmobject().ref_count()); - for (size_t i = 0; i < region.vmobject().page_count(); ++i) { - auto& physical_page = region.vmobject().physical_pages()[i]; - bool should_cow = false; - if (i >= region.first_page_index() && i <= region.last_page_index()) - should_cow = region.should_cow(i - region.first_page_index()); - builder.appendf("P%x%s(%u) ", - physical_page ? physical_page->paddr().get() : 0, - should_cow ? "!" : "", - physical_page ? physical_page->ref_count() : 0); - } - builder.appendf("\n"); - } - } - return true; -} - static bool procfs$pid_unveil(InodeIdentifier identifier, KBufferBuilder& builder) { auto process = Process::from_pid(to_pid(identifier)); @@ -1688,7 +1653,6 @@ ProcFS::ProcFS() m_entries[FI_Root_net_local] = { "local", FI_Root_net_local, false, procfs$net_local }; m_entries[FI_PID_vm] = { "vm", FI_PID_vm, false, procfs$pid_vm }; - m_entries[FI_PID_vmobjects] = { "vmobjects", FI_PID_vmobjects, true, procfs$pid_vmobjects }; m_entries[FI_PID_stacks] = { "stacks", FI_PID_stacks, false }; m_entries[FI_PID_fds] = { "fds", FI_PID_fds, false, procfs$pid_fds }; m_entries[FI_PID_exe] = { "exe", FI_PID_exe, false, procfs$pid_exe }; -- cgit v1.2.3