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

Arjen Hiemstra noreply at phabricator.kde.org
Fri Aug 23 18:56:40 BST 2019


ahiemstra created this revision.
ahiemstra added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
ahiemstra requested review of this revision.

REVISION SUMMARY
  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 https://lkml.org/lkml/2017/8/9/1073 , 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.

REPOSITORY
  R111 KSysguard Library

BRANCH
  pss

REVISION DETAIL
  https://phabricator.kde.org/D23382

AFFECTED FILES
  processcore/process.cpp
  processcore/process.h
  processcore/processes_linux_p.cpp
  processui/ProcessModel.cpp
  processui/ProcessModel.h
  processui/ksysguardprocesslist.cpp

To: ahiemstra, #plasma
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190823/b6411e16/attachment.html>


More information about the Plasma-devel mailing list