diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-29 12:45:58 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-29 12:45:58 +0100 |
commit | c74cde918a5ef031d5f01c663212b1c909564cf4 (patch) | |
tree | 2f0b13a03c6477053d418c47ba8b9189bb7cd5d9 /Applications | |
parent | 0d5e0e4cad512ebdcebc1c9a9171c412fcabbd3b (diff) | |
download | serenity-c74cde918a5ef031d5f01c663212b1c909564cf4.zip |
Kernel+SystemMonitor: Expose amount of per-process clean inode memory
This is memory that's loaded from an inode (file) but not modified in
memory, so still identical to what's on disk. This kind of memory can
be freed and reloaded transparently from disk if needed.
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/SystemMonitor/ProcessModel.cpp | 9 | ||||
-rw-r--r-- | Applications/SystemMonitor/ProcessModel.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Applications/SystemMonitor/ProcessModel.cpp b/Applications/SystemMonitor/ProcessModel.cpp index d84b52e59f..88fa965907 100644 --- a/Applications/SystemMonitor/ProcessModel.cpp +++ b/Applications/SystemMonitor/ProcessModel.cpp @@ -61,6 +61,8 @@ String ProcessModel::column_name(int column) const return "Physical"; case Column::DirtyPrivate: return "DirtyP"; + case Column::CleanInode: + return "CleanI"; case Column::PurgeableVolatile: return "Purg:V"; case Column::PurgeableNonvolatile: @@ -115,6 +117,8 @@ GModel::ColumnMetadata ProcessModel::column_metadata(int column) const return { 65, TextAlignment::CenterRight }; case Column::DirtyPrivate: return { 65, TextAlignment::CenterRight }; + case Column::CleanInode: + return { 65, TextAlignment::CenterRight }; case Column::PurgeableVolatile: return { 65, TextAlignment::CenterRight }; case Column::PurgeableNonvolatile: @@ -189,6 +193,8 @@ GVariant ProcessModel::data(const GModelIndex& index, Role role) const return (int)thread.current_state.amount_resident; case Column::DirtyPrivate: return (int)thread.current_state.amount_dirty_private; + case Column::CleanInode: + return (int)thread.current_state.amount_clean_inode; case Column::PurgeableVolatile: return (int)thread.current_state.amount_purgeable_volatile; case Column::PurgeableNonvolatile: @@ -258,6 +264,8 @@ GVariant ProcessModel::data(const GModelIndex& index, Role role) const return pretty_byte_size(thread.current_state.amount_resident); case Column::DirtyPrivate: return pretty_byte_size(thread.current_state.amount_dirty_private); + case Column::CleanInode: + return pretty_byte_size(thread.current_state.amount_clean_inode); case Column::PurgeableVolatile: return pretty_byte_size(thread.current_state.amount_purgeable_volatile); case Column::PurgeableNonvolatile: @@ -320,6 +328,7 @@ void ProcessModel::update() state.amount_virtual = it.value.amount_virtual; state.amount_resident = it.value.amount_resident; state.amount_dirty_private = it.value.amount_dirty_private; + state.amount_clean_inode = it.value.amount_clean_inode; state.amount_purgeable_volatile = it.value.amount_purgeable_volatile; state.amount_purgeable_nonvolatile = it.value.amount_purgeable_nonvolatile; state.icon_id = it.value.icon_id; diff --git a/Applications/SystemMonitor/ProcessModel.h b/Applications/SystemMonitor/ProcessModel.h index e8a38d5948..cccedbcb3a 100644 --- a/Applications/SystemMonitor/ProcessModel.h +++ b/Applications/SystemMonitor/ProcessModel.h @@ -31,6 +31,7 @@ public: Virtual, Physical, DirtyPrivate, + CleanInode, PurgeableVolatile, PurgeableNonvolatile, Syscalls, @@ -74,6 +75,7 @@ private: size_t amount_virtual; size_t amount_resident; size_t amount_dirty_private; + size_t amount_clean_inode; size_t amount_purgeable_volatile; size_t amount_purgeable_nonvolatile; unsigned syscall_count; |