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

Issue 1100073004: Adding discardable memory dump provider. (Closed)

Created:
5 years, 8 months ago by ssid
Modified:
5 years, 7 months ago
CC:
picksi1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding discardable memory dump provider. This CL adds a dump provider to dump discardable memory statistics to chrome://tracing. The ChildDiscardableSharedMemoryManager implements MemoryDumpProvider to dump the required stats. The details about each of the memory segment allocated by the manager is dumped. BUG=466141 Committed: https://crrev.com/3c7fbd4be81411b4c7553813b29de982a81eec0b Cr-Commit-Position: refs/heads/master@{#328354}

Patch Set 1 #

Total comments: 22

Patch Set 2 : Addressing comments. #

Total comments: 16

Patch Set 3 : Addressed comments. #

Total comments: 18

Patch Set 4 : Fixed comments. #

Total comments: 18

Patch Set 5 : Fixed comments. #

Total comments: 1

Patch Set 6 : Fixing tests. #

Total comments: 1

Patch Set 7 : Return value -> void. #

Total comments: 1

Patch Set 8 : Rebase for interface changes. #

Total comments: 2

Patch Set 9 : Naming the id. #

Total comments: 17

Patch Set 10 : Changing return value void -> bool. #

Total comments: 3

Patch Set 11 : Making return value void. #

Total comments: 2

Patch Set 12 : Changing c_str parameter to string. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -18 lines) Patch
M content/child/child_discardable_shared_memory_manager.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M content/child/child_discardable_shared_memory_manager.cc View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -1 line 0 comments Download
M content/common/discardable_shared_memory_heap.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +16 lines, -0 lines 0 comments Download
M content/common/discardable_shared_memory_heap.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +60 lines, -2 lines 0 comments Download
M content/common/discardable_shared_memory_heap_perftest.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M content/common/discardable_shared_memory_heap_unittest.cc View 1 2 3 4 5 6 7 8 10 chunks +28 lines, -12 lines 0 comments Download

Messages

Total messages: 49 (8 generated)
ssid
This adds details about each memory segment, but not have spans. PTAL
5 years, 8 months ago (2015-04-23 14:13:28 UTC) #2
Primiano Tucci (use gerrit)
Hmm I'd use the same design that we used when handling the V8 API change, ...
5 years, 8 months ago (2015-04-23 16:11:55 UTC) #3
reveman
https://codereview.chromium.org/1100073004/diff/1/content/child/child_discardable_shared_memory_manager.cc File content/child/child_discardable_shared_memory_manager.cc (right): https://codereview.chromium.org/1100073004/diff/1/content/child/child_discardable_shared_memory_manager.cc#newcode33 content/child/child_discardable_shared_memory_manager.cc:33: const char kMemoryDumperFriendlyName[] = "ChildDiscardable"; is "Discardable" enough? we're ...
5 years, 8 months ago (2015-04-23 17:32:31 UTC) #4
ssid
Please find comments inline. https://codereview.chromium.org/1100073004/diff/1/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/1/content/common/discardable_shared_memory_heap.cc#newcode65 content/common/discardable_shared_memory_heap.cc:65: MemoryStatistics::SegmentStatistics* segment_stats) { On 2015/04/23 ...
5 years, 8 months ago (2015-04-23 18:03:07 UTC) #5
reveman
https://codereview.chromium.org/1100073004/diff/1/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/1/content/common/discardable_shared_memory_heap.cc#newcode65 content/common/discardable_shared_memory_heap.cc:65: MemoryStatistics::SegmentStatistics* segment_stats) { On 2015/04/23 at 18:03:07, ssid wrote: ...
5 years, 8 months ago (2015-04-23 18:11:53 UTC) #6
ssid
Made changes, PTAL. https://codereview.chromium.org/1100073004/diff/1/content/child/child_discardable_shared_memory_manager.cc File content/child/child_discardable_shared_memory_manager.cc (right): https://codereview.chromium.org/1100073004/diff/1/content/child/child_discardable_shared_memory_manager.cc#newcode33 content/child/child_discardable_shared_memory_manager.cc:33: const char kMemoryDumperFriendlyName[] = "ChildDiscardable"; On ...
5 years, 8 months ago (2015-04-24 11:23:04 UTC) #7
reveman
https://codereview.chromium.org/1100073004/diff/20001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/20001/content/common/discardable_shared_memory_heap.cc#newcode218 content/common/discardable_shared_memory_heap.cc:218: for (size_t segment = 0; segment < memory_segments_.size(); segment++) ...
5 years, 8 months ago (2015-04-24 14:19:36 UTC) #8
ssid
Made changes, PTAL. https://codereview.chromium.org/1100073004/diff/20001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/20001/content/common/discardable_shared_memory_heap.cc#newcode218 content/common/discardable_shared_memory_heap.cc:218: for (size_t segment = 0; segment ...
5 years, 8 months ago (2015-04-27 11:19:21 UTC) #9
reveman
https://codereview.chromium.org/1100073004/diff/40001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/40001/content/common/discardable_shared_memory_heap.cc#newcode111 content/common/discardable_shared_memory_heap.cc:111: g_next_discardable_shared_memory_id.GetNext(); Please pass the ID as a parameter instead. ...
5 years, 8 months ago (2015-04-27 13:28:11 UTC) #10
ssid
Thanks made changes. https://codereview.chromium.org/1100073004/diff/40001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/40001/content/common/discardable_shared_memory_heap.cc#newcode111 content/common/discardable_shared_memory_heap.cc:111: g_next_discardable_shared_memory_id.GetNext(); On 2015/04/27 13:28:11, reveman wrote: ...
5 years, 8 months ago (2015-04-27 14:27:01 UTC) #11
reveman
lgtm after fixing this last set of nits https://codereview.chromium.org/1100073004/diff/40001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/40001/content/common/discardable_shared_memory_heap.cc#newcode354 content/common/discardable_shared_memory_heap.cc:354: pmd->CreateAllocatorDump(kMemoryAllocatorName, ...
5 years, 8 months ago (2015-04-27 15:08:58 UTC) #12
ssid
Thanks. https://codereview.chromium.org/1100073004/diff/60001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/60001/content/common/discardable_shared_memory_heap.cc#newcode9 content/common/discardable_shared_memory_heap.cc:9: #include "base/atomic_sequence_num.h" On 2015/04/27 15:08:58, reveman wrote: > ...
5 years, 8 months ago (2015-04-27 15:21:56 UTC) #13
reveman
+avi for owner review
5 years, 8 months ago (2015-04-27 15:23:17 UTC) #15
Avi (use Gerrit)
lgtm https://codereview.chromium.org/1100073004/diff/80001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/80001/content/common/discardable_shared_memory_heap.cc#newcode368 content/common/discardable_shared_memory_heap.cc:368: static_cast<uint64>(allocated_objects_size_in_bytes)); uint64_t. I know MemoryAllocatorDump uses uint64, but ...
5 years, 8 months ago (2015-04-27 15:28:38 UTC) #16
reveman
one nit but still lgtm https://codereview.chromium.org/1100073004/diff/100001/content/common/discardable_shared_memory_heap.h File content/common/discardable_shared_memory_heap.h (right): https://codereview.chromium.org/1100073004/diff/100001/content/common/discardable_shared_memory_heap.h#newcode89 content/common/discardable_shared_memory_heap.h:89: bool DumpInto(base::trace_event::ProcessMemoryDump* pmd); nit: ...
5 years, 8 months ago (2015-04-27 19:04:00 UTC) #17
ssid
On 2015/04/27 19:04:00, reveman wrote: > one nit but still lgtm > > https://codereview.chromium.org/1100073004/diff/100001/content/common/discardable_shared_memory_heap.h > ...
5 years, 7 months ago (2015-04-28 10:24:32 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1100073004/120001
5 years, 7 months ago (2015-04-28 10:24:46 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/66228)
5 years, 7 months ago (2015-04-28 10:35:37 UTC) #23
reveman
https://codereview.chromium.org/1100073004/diff/120001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/120001/content/common/discardable_shared_memory_heap.cc#newcode233 content/common/discardable_shared_memory_heap.cc:233: return true; this function doesn't have a return value ...
5 years, 7 months ago (2015-04-28 12:42:12 UTC) #24
Primiano Tucci (use gerrit)
This needs to be rebased against crrev.com/1107093004 + crrev.com/1105143003 (Which is landing right now). Essentially ...
5 years, 7 months ago (2015-04-28 14:06:04 UTC) #25
ssid
Made changes PTAL.
5 years, 7 months ago (2015-04-29 15:21:33 UTC) #26
picksi
https://codereview.chromium.org/1100073004/diff/140001/content/common/discardable_shared_memory_heap_perftest.cc File content/common/discardable_shared_memory_heap_perftest.cc (right): https://codereview.chromium.org/1100073004/diff/140001/content/common/discardable_shared_memory_heap_perftest.cc#newcode41 content/common/discardable_shared_memory_heap_perftest.cc:41: heap.Grow(memory.Pass(), segment_size, 0, base::Bind(NullTask)).Pass()); Is 0 a special ID? ...
5 years, 7 months ago (2015-04-29 15:30:15 UTC) #28
reveman
https://codereview.chromium.org/1100073004/diff/140001/content/common/discardable_shared_memory_heap_perftest.cc File content/common/discardable_shared_memory_heap_perftest.cc (right): https://codereview.chromium.org/1100073004/diff/140001/content/common/discardable_shared_memory_heap_perftest.cc#newcode41 content/common/discardable_shared_memory_heap_perftest.cc:41: heap.Grow(memory.Pass(), segment_size, 0, base::Bind(NullTask)).Pass()); On 2015/04/29 at 15:30:15, picksi ...
5 years, 7 months ago (2015-04-29 15:40:30 UTC) #29
ssid
PTAL.
5 years, 7 months ago (2015-04-29 16:08:17 UTC) #30
reveman
still lgtm
5 years, 7 months ago (2015-04-29 17:00:16 UTC) #31
Primiano Tucci (use gerrit)
Some nits. Feel free to ignore if you already discussed that with David and I ...
5 years, 7 months ago (2015-04-29 17:32:02 UTC) #32
reveman
https://codereview.chromium.org/1100073004/diff/160001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/160001/content/common/discardable_shared_memory_heap.cc#newcode229 content/common/discardable_shared_memory_heap.cc:229: std::for_each(memory_segments_.begin(), memory_segments_.end(), On 2015/04/29 at 17:32:02, Primiano Tucci wrote: ...
5 years, 7 months ago (2015-04-29 18:27:43 UTC) #33
reveman
https://codereview.chromium.org/1100073004/diff/160001/content/common/discardable_shared_memory_heap.h File content/common/discardable_shared_memory_heap.h (right): https://codereview.chromium.org/1100073004/diff/160001/content/common/discardable_shared_memory_heap.h#newcode89 content/common/discardable_shared_memory_heap.h:89: void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd); On 2015/04/29 at 17:32:02, Primiano Tucci ...
5 years, 7 months ago (2015-04-29 18:31:00 UTC) #34
Primiano Tucci (use gerrit)
Nevermind, I missed Avi's comment. Ignore my comments then. > Btw, I was under the ...
5 years, 7 months ago (2015-04-29 18:35:02 UTC) #35
reveman
On 2015/04/29 at 18:35:02, primiano wrote: > Nevermind, I missed Avi's comment. Ignore my comments ...
5 years, 7 months ago (2015-04-29 18:53:10 UTC) #36
ssid
On 2015/04/29 18:53:10, reveman wrote: > On 2015/04/29 at 18:35:02, primiano wrote: > > Nevermind, ...
5 years, 7 months ago (2015-04-30 16:05:18 UTC) #37
reveman
https://codereview.chromium.org/1100073004/diff/180001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/180001/content/common/discardable_shared_memory_heap.cc#newcode234 content/common/discardable_shared_memory_heap.cc:234: is_dump_valid &= segment->OnMemoryDump(pmd); It seems bad to keep trying ...
5 years, 7 months ago (2015-04-30 16:36:49 UTC) #38
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1100073004/diff/160001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/160001/content/common/discardable_shared_memory_heap.cc#newcode341 content/common/discardable_shared_memory_heap.cc:341: size_t size, On 2015/04/29 18:27:43, reveman wrote: > On ...
5 years, 7 months ago (2015-04-30 16:59:35 UTC) #39
reveman
https://codereview.chromium.org/1100073004/diff/180001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/180001/content/common/discardable_shared_memory_heap.cc#newcode234 content/common/discardable_shared_memory_heap.cc:234: is_dump_valid &= segment->OnMemoryDump(pmd); On 2015/04/30 at 16:59:35, Primiano Tucci ...
5 years, 7 months ago (2015-04-30 17:09:40 UTC) #40
ssid
I can't find a way to break for_each from lambda function. I have removed the ...
5 years, 7 months ago (2015-05-05 10:24:32 UTC) #41
reveman
On 2015/05/05 at 10:24:32, ssid wrote: > I can't find a way to break for_each ...
5 years, 7 months ago (2015-05-05 14:44:02 UTC) #42
Primiano Tucci (use gerrit)
LGTM % 1 comment https://codereview.chromium.org/1100073004/diff/200001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/200001/content/common/discardable_shared_memory_heap.cc#newcode349 content/common/discardable_shared_memory_heap.cc:349: pmd->CreateAllocatorDump(heap_name.c_str()); No need to c_str ...
5 years, 7 months ago (2015-05-05 15:37:15 UTC) #43
ssid
addressed comments. https://codereview.chromium.org/1100073004/diff/200001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1100073004/diff/200001/content/common/discardable_shared_memory_heap.cc#newcode349 content/common/discardable_shared_memory_heap.cc:349: pmd->CreateAllocatorDump(heap_name.c_str()); On 2015/05/05 15:37:15, Primiano Tucci wrote: ...
5 years, 7 months ago (2015-05-05 16:25:25 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1100073004/220001
5 years, 7 months ago (2015-05-05 16:26:13 UTC) #47
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 7 months ago (2015-05-05 17:43:09 UTC) #48
commit-bot: I haz the power
5 years, 7 months ago (2015-05-05 17:44:54 UTC) #49
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/3c7fbd4be81411b4c7553813b29de982a81eec0b
Cr-Commit-Position: refs/heads/master@{#328354}

Powered by Google App Engine
This is Rietveld 408576698