Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 2740423002: mac: Fix calulation for number of resident pages in a process. (Closed)

Created:
3 years, 9 months ago by erikchen
Modified:
3 years, 9 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, mac-reviews_chromium.org, vmpstr+watch_chromium.org, ssid
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mac: Fix calulation for resident size of a process. The previous implementation of GetWorkingSetSize used task_info(TASK_BASIC_INFO_64), which returns the number of resident pages in the pmap for the vm subsystem for the process. This fails to correctly account for resident pages of copy-on-write and shared memory memory regions, as the pages might be mapped by the pmap for another process. In passing, this CL fixes a typo in process_metrics_memory_dump_provider.cc, which used defined(MACOSX) instead of defined(OS_MACOSX). BUG=700532, 693263 Review-Url: https://codereview.chromium.org/2740423002 Cr-Commit-Position: refs/heads/master@{#456514} Committed: https://chromium.googlesource.com/chromium/src/+/56722415bddf6b1eb88f6e7fb9e9d4df7f21b9a1

Patch Set 1 #

Total comments: 11

Patch Set 2 : Comments from mark, primiano. #

Total comments: 2

Patch Set 3 : comments from mark. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -23 lines) Patch
M base/process/process_metrics.h View 1 2 chunks +5 lines, -2 lines 0 comments Download
M base/process/process_metrics_freebsd.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/process/process_metrics_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/process/process_metrics_mac.cc View 1 2 5 chunks +19 lines, -4 lines 0 comments Download
M base/process/process_metrics_openbsd.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/process/process_metrics_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/task_manager/sampling/task_group_sampler.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M components/tracing/common/process_metrics_memory_dump_provider.cc View 1 2 chunks +16 lines, -9 lines 0 comments Download

Messages

Total messages: 36 (19 generated)
erikchen
mark, primiano: Please review.
3 years, 9 months ago (2017-03-11 01:56:40 UTC) #8
Primiano Tucci (use gerrit)
Not too many ideas on the various states on memory pages on OSX, but I ...
3 years, 9 months ago (2017-03-13 13:59:34 UTC) #9
Mark Mentovai
LGTM either way though https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc File chrome/browser/task_manager/sampling/task_group_sampler.cc (left): https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc#oldcode129 chrome/browser/task_manager/sampling/task_group_sampler.cc:129: memory_usage.physical_bytes = Leaving this alone ...
3 years, 9 months ago (2017-03-13 18:13:33 UTC) #10
ssid
Thanks for fixing this https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc File chrome/browser/task_manager/sampling/task_group_sampler.cc (left): https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc#oldcode129 chrome/browser/task_manager/sampling/task_group_sampler.cc:129: memory_usage.physical_bytes = On 2017/03/13 18:13:33, ...
3 years, 9 months ago (2017-03-13 18:44:55 UTC) #12
Mark Mentovai
https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc File chrome/browser/task_manager/sampling/task_group_sampler.cc (left): https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc#oldcode129 chrome/browser/task_manager/sampling/task_group_sampler.cc:129: memory_usage.physical_bytes = ssid wrote: > On 2017/03/13 18:13:33, Mark ...
3 years, 9 months ago (2017-03-13 18:48:03 UTC) #13
ssid
Also is the bug 693263 related? https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc File chrome/browser/task_manager/sampling/task_group_sampler.cc (left): https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc#oldcode129 chrome/browser/task_manager/sampling/task_group_sampler.cc:129: memory_usage.physical_bytes = On ...
3 years, 9 months ago (2017-03-13 18:59:14 UTC) #14
ssid
Also is the bug 693263 related? https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc File chrome/browser/task_manager/sampling/task_group_sampler.cc (left): https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc#oldcode129 chrome/browser/task_manager/sampling/task_group_sampler.cc:129: memory_usage.physical_bytes = On ...
3 years, 9 months ago (2017-03-13 18:59:15 UTC) #15
erikchen
On 2017/03/13 18:59:15, ssid wrote: > Also is the bug 693263 related? Issue 693263 is ...
3 years, 9 months ago (2017-03-13 19:33:56 UTC) #16
erikchen
https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc File chrome/browser/task_manager/sampling/task_group_sampler.cc (left): https://codereview.chromium.org/2740423002/diff/1/chrome/browser/task_manager/sampling/task_group_sampler.cc#oldcode129 chrome/browser/task_manager/sampling/task_group_sampler.cc:129: memory_usage.physical_bytes = On 2017/03/13 18:59:14, ssid wrote: > On ...
3 years, 9 months ago (2017-03-13 21:00:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2740423002/20001
3 years, 9 months ago (2017-03-13 21:01:59 UTC) #23
Mark Mentovai
LGTM https://codereview.chromium.org/2740423002/diff/20001/base/process/process_metrics_mac.cc File base/process/process_metrics_mac.cc (right): https://codereview.chromium.org/2740423002/diff/20001/base/process/process_metrics_mac.cc#newcode117 base/process/process_metrics_mac.cc:117: return private_bytes + shared_bytes; Call the 3-arg GetMemoryBytes() ...
3 years, 9 months ago (2017-03-13 21:05:08 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/384246)
3 years, 9 months ago (2017-03-13 21:11:53 UTC) #26
erikchen
https://codereview.chromium.org/2740423002/diff/20001/base/process/process_metrics_mac.cc File base/process/process_metrics_mac.cc (right): https://codereview.chromium.org/2740423002/diff/20001/base/process/process_metrics_mac.cc#newcode117 base/process/process_metrics_mac.cc:117: return private_bytes + shared_bytes; On 2017/03/13 21:05:08, Mark Mentovai ...
3 years, 9 months ago (2017-03-13 21:19:04 UTC) #27
erikchen
nick: Please review chrome/browser/task_manager.
3 years, 9 months ago (2017-03-13 21:19:24 UTC) #29
ncarter (slow)
lgtm
3 years, 9 months ago (2017-03-13 21:28:38 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2740423002/40001
3 years, 9 months ago (2017-03-13 21:34:01 UTC) #33
commit-bot: I haz the power
3 years, 9 months ago (2017-03-13 22:47:38 UTC) #36
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/56722415bddf6b1eb88f6e7fb9e9...

Powered by Google App Engine
This is Rietveld 408576698