mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Kernel: Expose the VMObject type of each Region in /proc/PID/vm
This commit is contained in:
parent
8fbdda5a2d
commit
5f7056d62c
|
@ -315,6 +315,7 @@ Optional<KBuffer> procfs$pid_vm(InodeIdentifier identifier)
|
|||
region_object.add("amount_dirty", (u32)region.amount_dirty());
|
||||
region_object.add("cow_pages", region.cow_pages());
|
||||
region_object.add("name", region.name());
|
||||
region_object.add("vmobject", region.vmobject().class_name());
|
||||
|
||||
StringBuilder pagemap_builder;
|
||||
for (size_t i = 0; i < region.page_count(); ++i) {
|
||||
|
|
|
@ -44,6 +44,8 @@ protected:
|
|||
explicit AnonymousVMObject(size_t);
|
||||
explicit AnonymousVMObject(const AnonymousVMObject&);
|
||||
|
||||
virtual const char* class_name() const override { return "AnonymousVMObject"; }
|
||||
|
||||
private:
|
||||
AnonymousVMObject(PhysicalAddress, size_t);
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ private:
|
|||
explicit PrivateInodeVMObject(Inode&, size_t);
|
||||
explicit PrivateInodeVMObject(const PrivateInodeVMObject&);
|
||||
|
||||
virtual const char* class_name() const override { return "PrivateInodeVMObject"; }
|
||||
|
||||
PrivateInodeVMObject& operator=(const PrivateInodeVMObject&) = delete;
|
||||
};
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ private:
|
|||
explicit PurgeableVMObject(size_t);
|
||||
explicit PurgeableVMObject(const PurgeableVMObject&);
|
||||
|
||||
virtual const char* class_name() const override { return "PurgeableVMObject"; }
|
||||
|
||||
int purge_impl();
|
||||
|
||||
PurgeableVMObject& operator=(const PurgeableVMObject&) = delete;
|
||||
|
|
|
@ -45,6 +45,8 @@ private:
|
|||
explicit SharedInodeVMObject(Inode&, size_t);
|
||||
explicit SharedInodeVMObject(const SharedInodeVMObject&);
|
||||
|
||||
virtual const char* class_name() const override { return "SharedInodeVMObject"; }
|
||||
|
||||
SharedInodeVMObject& operator=(const SharedInodeVMObject&) = delete;
|
||||
};
|
||||
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
|
||||
size_t size() const { return m_physical_pages.size() * PAGE_SIZE; }
|
||||
|
||||
virtual const char* class_name() const = 0;
|
||||
|
||||
// For InlineLinkedListNode
|
||||
VMObject* m_next { nullptr };
|
||||
VMObject* m_prev { nullptr };
|
||||
|
|
Loading…
Reference in a new issue