Use /usr/bin/top in about:memory
Currently we get memory information for about:memory using /bin/ps. Unfortuantely ps doesn't give us information about shared and private memory. Also, it's total virtual memory value doesn't match Activity Monitor's. This change adds code to get memory information using /usr/bin/top. The new code falls back to ps if there's a parsing error. Once about:memory displays all the information we need there are still a couple of things left to do: - refactor ProcessInfoSnapshot to use ProcessMetrics where possible - do a better job of detecting shared objects between our child processes and show it some how BUG=25454 TEST=Opened about:memory and verified that the values matched those in Activity Monitor. Tested on both 10.6 and 10.5. Review URL: http://codereview.chromium.org/6052005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71114 0039d316-1c4b-4281-b951-d872f2087c98
Showing
- chrome/browser/process_info_snapshot.h 21 additions, 11 deletionschrome/browser/process_info_snapshot.h
- chrome/browser/process_info_snapshot_mac.cc 331 additions, 36 deletionschrome/browser/process_info_snapshot_mac.cc
- chrome/browser/process_info_snapshot_mac_unittest.cc 29 additions, 3 deletionschrome/browser/process_info_snapshot_mac_unittest.cc
- chrome/browser/resources/about_memory_mac.html 49 additions, 5 deletionschrome/browser/resources/about_memory_mac.html
Loading
Please register or sign in to comment