Add vmPSS to Process and display it as "total memory" column

Authored by ahiemstra on Aug 23 2019, 5:34 PM.


Add vmPSS to Process and display it as "total memory" column

This adds a "proportional state set" value to ProcessCore::Process, that is then
exposed as "Total Memory" column in KSysGuard. This column is hidden by default.

PSS is the amount of memory a process uses privately + the amount of shared memory
divided by the amount of processes sharing that memory. It is, as far as I know, the
closest we can get to "total physical memory usage" for a process.

The value for PSS is read from /proc/{pid}/smaps_rollup . This unfortunately means
we cannot currently display PSS for processes not owned by the current user, as
smaps_rollup is not world-readable.

For some background on this, see , which is the
patch that adds smaps_rollup and talks about what Android uses it for.

Test Plan:
Run ksysguard, then toggle display of the "Total Memory" column. Values should be
higher than the "Memory" column.

Reviewers: Plasma, davidedmundson

Reviewed By: Plasma, davidedmundson

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: