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

Issue 1375963007: [tracing] Display the resident size of the discardable memory segments (Closed)

Created:
5 years, 2 months ago by ssid
Modified:
5 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, tracing+reviews_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@lock_discardable
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[tracing] Display the resident size of the discardable memory segments This CL displays the total size of the resident pages of the discardable memory segments. The resident page is counted using mincore system call in posix systems. It is not implemented in other platforms. TBR=avi@chromium.org BUG=528632 Committed: https://crrev.com/a3fc37f99203bfecf0b701aa7aaf4d985e289117 Cr-Commit-Position: refs/heads/master@{#353546}

Patch Set 1 #

Patch Set 2 : Fix mac. #

Total comments: 6

Patch Set 3 : Fixes. #

Total comments: 1

Patch Set 4 : Change ssize_t to int64 #

Patch Set 5 : Using suppotrted macro. #

Total comments: 20

Patch Set 6 : Refactoring into same function. #

Patch Set 7 : Move the attribute to global dump. #

Total comments: 10

Patch Set 8 : Fixes. #

Total comments: 2

Patch Set 9 : memset. #

Patch Set 10 : Nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -1 line) Patch
M base/trace_event/process_memory_dump.h View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M base/trace_event/process_memory_dump.cc View 1 2 3 4 5 6 7 2 chunks +47 lines, -0 lines 0 comments Download
M base/trace_event/process_memory_dump_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -1 line 0 comments Download
M content/common/host_discardable_shared_memory_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 42 (14 generated)
ssid
I have not tested it on mac yet. But it works on linux and android ...
5 years, 2 months ago (2015-10-06 16:48:42 UTC) #2
Primiano Tucci (use gerrit)
Makes sense to me, but we need to fix a bit the logic of the ...
5 years, 2 months ago (2015-10-06 17:14:09 UTC) #3
ssid
Made changes, PTAL thanks https://codereview.chromium.org/1375963007/diff/20001/base/trace_event/process_memory_dump.cc File base/trace_event/process_memory_dump.cc (right): https://codereview.chromium.org/1375963007/diff/20001/base/trace_event/process_memory_dump.cc#newcode171 base/trace_event/process_memory_dump.cc:171: const size_t page_size = base::GetPageSize(); ...
5 years, 2 months ago (2015-10-07 09:13:19 UTC) #7
ssid
+reveman for the discardable manager file. PTAL thanks
5 years, 2 months ago (2015-10-07 09:20:04 UTC) #9
reveman
https://codereview.chromium.org/1375963007/diff/80001/base/trace_event/process_memory_dump.h File base/trace_event/process_memory_dump.h (right): https://codereview.chromium.org/1375963007/diff/80001/base/trace_event/process_memory_dump.h#newcode47 base/trace_event/process_memory_dump.h:47: // process. Returns -1 if counting is not implemented ...
5 years, 2 months ago (2015-10-07 09:40:04 UTC) #10
ssid
On 2015/10/07 09:40:04, reveman wrote: > https://codereview.chromium.org/1375963007/diff/80001/base/trace_event/process_memory_dump.h > File base/trace_event/process_memory_dump.h (right): > > https://codereview.chromium.org/1375963007/diff/80001/base/trace_event/process_memory_dump.h#newcode47 > ...
5 years, 2 months ago (2015-10-07 09:48:05 UTC) #11
reveman
On 2015/10/07 at 09:48:05, ssid wrote: > On 2015/10/07 09:40:04, reveman wrote: > > https://codereview.chromium.org/1375963007/diff/80001/base/trace_event/process_memory_dump.h ...
5 years, 2 months ago (2015-10-07 09:58:30 UTC) #12
Primiano Tucci (use gerrit)
+1 for ifdef if that can be known purely at compile time.
5 years, 2 months ago (2015-10-07 10:13:03 UTC) #13
Primiano Tucci (use gerrit)
On 2015/10/07 10:13:03, Primiano Tucci wrote: > +1 for ifdef if that can be known ...
5 years, 2 months ago (2015-10-07 10:29:36 UTC) #14
Primiano Tucci (use gerrit)
On 2015/10/07 10:29:36, Primiano Tucci wrote: > On 2015/10/07 10:13:03, Primiano Tucci wrote: > > ...
5 years, 2 months ago (2015-10-07 10:34:02 UTC) #15
Primiano Tucci (use gerrit)
Also, how long do these mincore calls take? Should this happen only on heavy dumps?
5 years, 2 months ago (2015-10-07 10:35:07 UTC) #16
ssid
With offline discussion, the resident size cannot be displayed in sandboxed processed since secomp-bpf does ...
5 years, 2 months ago (2015-10-07 12:47:21 UTC) #19
reveman
lgtm with nits https://codereview.chromium.org/1375963007/diff/180001/content/common/host_discardable_shared_memory_manager.cc File content/common/host_discardable_shared_memory_manager.cc (right): https://codereview.chromium.org/1375963007/diff/180001/content/common/host_discardable_shared_memory_manager.cc#newcode191 content/common/host_discardable_shared_memory_manager.cc:191: int64 resident_size = nit: size_t as ...
5 years, 2 months ago (2015-10-07 13:41:44 UTC) #20
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1375963007/diff/180001/base/trace_event/process_memory_dump.cc File base/trace_event/process_memory_dump.cc (right): https://codereview.chromium.org/1375963007/diff/180001/base/trace_event/process_memory_dump.cc#newcode25 base/trace_event/process_memory_dump.cc:25: #if defined(COUNT_RESIDENT_BYTES_SUPPORTED) I'd probably just put them in one ...
5 years, 2 months ago (2015-10-07 13:59:51 UTC) #21
ssid
Made changes, Thanks, see replies inline. https://codereview.chromium.org/1375963007/diff/180001/base/trace_event/process_memory_dump.cc File base/trace_event/process_memory_dump.cc (right): https://codereview.chromium.org/1375963007/diff/180001/base/trace_event/process_memory_dump.cc#newcode25 base/trace_event/process_memory_dump.cc:25: #if defined(COUNT_RESIDENT_BYTES_SUPPORTED) On ...
5 years, 2 months ago (2015-10-07 14:46:45 UTC) #23
ssid
I have changed the discardable attribute to be added in global dump instead of segment ...
5 years, 2 months ago (2015-10-08 09:31:38 UTC) #24
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1375963007/diff/240001/base/trace_event/process_memory_dump.cc File base/trace_event/process_memory_dump.cc (right): https://codereview.chromium.org/1375963007/diff/240001/base/trace_event/process_memory_dump.cc#newcode38 base/trace_event/process_memory_dump.cc:38: const size_t kMemoryChunkSize = 32 * 1024 * 1024; ...
5 years, 2 months ago (2015-10-08 17:34:36 UTC) #25
ssid
Thanks PTAL https://codereview.chromium.org/1375963007/diff/240001/base/trace_event/process_memory_dump.cc File base/trace_event/process_memory_dump.cc (right): https://codereview.chromium.org/1375963007/diff/240001/base/trace_event/process_memory_dump.cc#newcode38 base/trace_event/process_memory_dump.cc:38: const size_t kMemoryChunkSize = 32 * 1024 ...
5 years, 2 months ago (2015-10-08 18:18:10 UTC) #26
Primiano Tucci (use gerrit)
LGTM thanks https://codereview.chromium.org/1375963007/diff/260001/base/trace_event/process_memory_dump_unittest.cc File base/trace_event/process_memory_dump_unittest.cc (right): https://codereview.chromium.org/1375963007/diff/260001/base/trace_event/process_memory_dump_unittest.cc#newcode165 base/trace_event/process_memory_dump_unittest.cc:165: size_t res1 = I think you want ...
5 years, 2 months ago (2015-10-09 09:48:51 UTC) #27
ssid
https://codereview.chromium.org/1375963007/diff/260001/base/trace_event/process_memory_dump_unittest.cc File base/trace_event/process_memory_dump_unittest.cc (right): https://codereview.chromium.org/1375963007/diff/260001/base/trace_event/process_memory_dump_unittest.cc#newcode165 base/trace_event/process_memory_dump_unittest.cc:165: size_t res1 = On 2015/10/09 09:48:51, Primiano Tucci wrote: ...
5 years, 2 months ago (2015-10-09 10:57:40 UTC) #28
ssid
TBRing avi@ for tracing related change in discardable manager. Approved by reveman@.
5 years, 2 months ago (2015-10-12 16:11:28 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1375963007/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1375963007/300001
5 years, 2 months ago (2015-10-12 16:12:08 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/143425)
5 years, 2 months ago (2015-10-12 16:32:57 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1375963007/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1375963007/300001
5 years, 2 months ago (2015-10-12 16:35:32 UTC) #37
Avi (use Gerrit)
lgtm stampity stamp
5 years, 2 months ago (2015-10-12 16:37:53 UTC) #38
Primiano Tucci (use gerrit)
On 2015/10/12 16:11:28, ssid wrote: > TBRing avi@ for tracing related change in discardable manager. ...
5 years, 2 months ago (2015-10-12 16:42:54 UTC) #39
commit-bot: I haz the power
Committed patchset #10 (id:300001)
5 years, 2 months ago (2015-10-12 17:37:04 UTC) #40
commit-bot: I haz the power
5 years, 2 months ago (2015-10-12 17:37:53 UTC) #41
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/a3fc37f99203bfecf0b701aa7aaf4d985e289117
Cr-Commit-Position: refs/heads/master@{#353546}

Powered by Google App Engine
This is Rietveld 408576698