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

Issue 2549803003: Add function to compute proportional set size for OS_WIN (Closed)

Created:
4 years ago by chengx
Modified:
4 years ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add function to compute proportional set size for OS_WIN Memory-Infra on Windows doesn't use memory usage reported by the OS (proportional set size, private dirty, etc.) yet. This CL added functionality to calculate proportional set size for a process. BUG=623499 Committed: https://crrev.com/b172892773fe15a10508f733ca0bc831240a7ec6 Cr-Commit-Position: refs/heads/master@{#437827}

Patch Set 1 #

Total comments: 6

Patch Set 2 : More encapsulation of code, better comment. #

Total comments: 17

Patch Set 3 : Fix small bugs and more code improvement #

Total comments: 1

Patch Set 4 : Fix functionality #

Total comments: 22

Patch Set 5 : Fix a few nits #

Patch Set 6 : Better names for variables and functions #

Total comments: 5

Patch Set 7 : Make variable type consistent #

Total comments: 2

Patch Set 8 : Fix some comments #

Patch Set 9 : Fix compile error for std::min #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -38 lines) Patch
M base/process/process_metrics.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M base/process/process_metrics_win.cc View 1 2 3 4 5 6 7 8 4 chunks +79 lines, -37 lines 0 comments Download
M components/tracing/common/process_metrics_memory_dump_provider.cc View 1 2 3 1 chunk +14 lines, -1 line 0 comments Download

Messages

Total messages: 76 (55 generated)
chengx
PTAL~
4 years ago (2016-12-03 00:19:08 UTC) #8
brucedawson
Looks reasonable, modulo the comments below. Is this returning all of the information of interest? ...
4 years ago (2016-12-05 19:22:02 UTC) #11
chengx
On 2016/12/05 19:22:02, brucedawson wrote: > Looks reasonable, modulo the comments below. > > Is ...
4 years ago (2016-12-05 20:37:11 UTC) #12
chengx
This CL is ready for review. PTAL~ https://codereview.chromium.org/2549803003/diff/20001/base/process/process_metrics.h File base/process/process_metrics.h (right): https://codereview.chromium.org/2549803003/diff/20001/base/process/process_metrics.h#newcode148 base/process/process_metrics.h:148: // Computes ...
4 years ago (2016-12-06 02:51:39 UTC) #16
brucedawson
A few nits but otherwise lgtm. I defer to primiano for whether this is sufficient ...
4 years ago (2016-12-06 02:58:55 UTC) #17
Primiano Tucci (use gerrit)
Thanks for championing this. Definitely having a PSS number is the key things for the ...
4 years ago (2016-12-06 17:47:57 UTC) #20
chengx
Thanks for the comments! Primiano@, I don't think two QueryWorkingSet() are called back to back. ...
4 years ago (2016-12-06 19:40:09 UTC) #23
brucedawson
> I guess that a > combination of VirtualQueryEx + GetMappedFileName + QueryWorkingSetEx might do ...
4 years ago (2016-12-06 21:10:51 UTC) #24
Primiano Tucci (use gerrit)
LGTM with a small final comment > BESIDES, Primiano@ do you think this CL is ...
4 years ago (2016-12-08 16:36:01 UTC) #27
chengx
Hi Daniel, PTAL the /base/process code in this CL. Thank you!
4 years ago (2016-12-08 19:51:59 UTC) #31
dcheng
https://codereview.chromium.org/2549803003/diff/80001/base/process/process_metrics_win.cc File base/process/process_metrics_win.cc (right): https://codereview.chromium.org/2549803003/diff/80001/base/process/process_metrics_win.cc#newcode174 base/process/process_metrics_win.cc:174: // Call the function once to get number of ...
4 years ago (2016-12-08 20:25:30 UTC) #32
chengx
@Daniel, I have fixed some of the nits. For the rest, I have included Stan, ...
4 years ago (2016-12-08 23:03:13 UTC) #37
stanisc
https://codereview.chromium.org/2549803003/diff/80001/base/process/process_metrics_win.cc File base/process/process_metrics_win.cc (right): https://codereview.chromium.org/2549803003/diff/80001/base/process/process_metrics_win.cc#newcode160 base/process/process_metrics_win.cc:160: DWORD GetPageEntriesNumber() const { return number_of_entries; } Nit: Consider ...
4 years ago (2016-12-09 01:19:55 UTC) #40
chengx
PTAL~ Daniel@ Stan@ https://codereview.chromium.org/2549803003/diff/80001/base/process/process_metrics_win.cc File base/process/process_metrics_win.cc (right): https://codereview.chromium.org/2549803003/diff/80001/base/process/process_metrics_win.cc#newcode160 base/process/process_metrics_win.cc:160: DWORD GetPageEntriesNumber() const { return number_of_entries; ...
4 years ago (2016-12-09 22:34:32 UTC) #44
stanisc
https://codereview.chromium.org/2549803003/diff/160001/base/process/process_metrics_win.cc File base/process/process_metrics_win.cc (right): https://codereview.chromium.org/2549803003/diff/160001/base/process/process_metrics_win.cc#newcode160 base/process/process_metrics_win.cc:160: DWORD GetPageEntryCount() const { return number_of_entries; } This should ...
4 years ago (2016-12-09 22:46:40 UTC) #49
chengx
Stan@, please see my reply to your comments below. Thanks! https://codereview.chromium.org/2549803003/diff/160001/base/process/process_metrics_win.cc File base/process/process_metrics_win.cc (right): https://codereview.chromium.org/2549803003/diff/160001/base/process/process_metrics_win.cc#newcode160 ...
4 years ago (2016-12-09 23:03:11 UTC) #50
stanisc
lgtm
4 years ago (2016-12-09 23:09:24 UTC) #53
dcheng
lgtm with comments addressed https://codereview.chromium.org/2549803003/diff/160001/base/process/process_metrics_win.cc File base/process/process_metrics_win.cc (right): https://codereview.chromium.org/2549803003/diff/160001/base/process/process_metrics_win.cc#newcode201 base/process/process_metrics_win.cc:201: number_of_entries = std::min(number_of_entries, buffer_->NumberOfEntries); Can ...
4 years ago (2016-12-10 00:42:00 UTC) #56
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/2549803003/220001
4 years ago (2016-12-12 06:51:38 UTC) #71
commit-bot: I haz the power
Committed patchset #9 (id:220001)
4 years ago (2016-12-12 06:56:29 UTC) #74
commit-bot: I haz the power
4 years ago (2016-12-12 15:10:54 UTC) #76
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/b172892773fe15a10508f733ca0bc831240a7ec6
Cr-Commit-Position: refs/heads/master@{#437827}

Powered by Google App Engine
This is Rietveld 408576698