Fix virtual memory column on chrome://memory on Mac.

This got broken by:

https://codereview.chromium.org/857063002/

Which stopped querying the metrics for Chrome processes
using PS/TOP.

This CL restores getting committed memory usage info,
but does it through ProcessMetrics (I verified that the
new approach returns the same values as the previous
code path that used PS/TOP).

Implements getting committed private memory in the Mac
implementation of ProcessMetrics and adds a new call -
GetCommittedAndWorkingSetKBytes() - that allows querying
both committed and working set memory in a single call.
Since the underlying implementation for both is done
using the same system call, this is more efficient as
we don't need to query the same info from the system twice.

BUG=451061
TEST=Open chrome://memory and verify that the "Virtual"
column has actual values in it for Chrome processes.

Review URL: https://codereview.chromium.org/865983002

Cr-Commit-Position: refs/heads/master@{#312736}


CrOS-Libchrome-Original-Commit: 57e53d315e9cc18680580c9249486ae8f9d888e3
1 file changed
tree: b5adbda8f71799753d17012e113d45fd04c01c6c
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/