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

Issue 1259333003: [tracing] Add SkResourceCache as suballocation to avoid double counting. (Closed)

Created:
5 years, 4 months ago by ssid
Modified:
5 years, 2 months ago
Reviewers:
petrcermak, reveman, reed1
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@skia_v1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[tracing] Add SkResourceCache as suballocation to avoid double counting. The SkResourceCache can be allocated from either malloc or discardable memory. This causes the memory dumps to be double counted. This CL adds the resource cache dumps as sub-allocation from appropriate allocator. BUG=503168

Patch Set 1 #

Patch Set 2 : Fixes. #

Patch Set 3 : Clean up. #

Total comments: 11

Patch Set 4 : Adding host and fixing style. #

Patch Set 5 : More fixes. #

Patch Set 6 : Nits. #

Total comments: 15

Patch Set 7 : addresssing comments. #

Total comments: 8

Patch Set 8 : Nits. #

Patch Set 9 : Fixing comments. #

Total comments: 19

Patch Set 10 : Adressing comments. #

Patch Set 11 : Nits. #

Total comments: 10

Patch Set 12 : Removing segment dump from base. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -8 lines) Patch
M base/memory/discardable_memory_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -0 lines 0 comments Download
M base/memory/discardable_memory_allocator.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -0 lines 0 comments Download
M content/child/child_discardable_shared_memory_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download
M content/common/discardable_shared_memory_heap.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/common/host_discardable_shared_memory_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -2 lines 0 comments Download
M skia/ext/skia_memory_dump_provider.cc View 1 2 3 4 5 6 7 8 9 2 chunks +16 lines, -5 lines 0 comments Download

Messages

Total messages: 23 (3 generated)
ssid
PTAL.
5 years, 4 months ago (2015-07-29 10:22:05 UTC) #2
petrcermak
Looks good overall. Couple of comments. Thanks, Petr https://codereview.chromium.org/1259333003/diff/40001/content/child/child_discardable_shared_memory_manager.cc File content/child/child_discardable_shared_memory_manager.cc (right): https://codereview.chromium.org/1259333003/diff/40001/content/child/child_discardable_shared_memory_manager.cc#newcode201 content/child/child_discardable_shared_memory_manager.cc:201: pmd->CreateAllocatorDump("discardable/allocated_objects"); ...
5 years, 4 months ago (2015-07-29 11:53:34 UTC) #3
ssid
PTAL https://codereview.chromium.org/1259333003/diff/40001/content/child/child_discardable_shared_memory_manager.cc File content/child/child_discardable_shared_memory_manager.cc (right): https://codereview.chromium.org/1259333003/diff/40001/content/child/child_discardable_shared_memory_manager.cc#newcode201 content/child/child_discardable_shared_memory_manager.cc:201: pmd->CreateAllocatorDump("discardable/allocated_objects"); On 2015/07/29 11:53:34, petrcermak wrote: > Any ...
5 years, 4 months ago (2015-07-29 16:20:51 UTC) #4
petrcermak
A few more comments. Thanks, Petr https://codereview.chromium.org/1259333003/diff/100001/base/memory/discardable_shared_memory.h File base/memory/discardable_shared_memory.h (right): https://codereview.chromium.org/1259333003/diff/100001/base/memory/discardable_shared_memory.h#newcode35 base/memory/discardable_shared_memory.h:35: // Eg. : ...
5 years, 4 months ago (2015-07-29 16:39:00 UTC) #5
ssid
Thanks, made changes. https://codereview.chromium.org/1259333003/diff/100001/base/memory/discardable_shared_memory.h File base/memory/discardable_shared_memory.h (right): https://codereview.chromium.org/1259333003/diff/100001/base/memory/discardable_shared_memory.h#newcode35 base/memory/discardable_shared_memory.h:35: // Eg. : ProcessMemoryDump::AddSuballocation(skia_dump_guid, On 2015/07/29 ...
5 years, 4 months ago (2015-07-29 16:57:37 UTC) #6
petrcermak
LGTM with 5 more comments (sorry). Thanks, Petr https://codereview.chromium.org/1259333003/diff/120001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1259333003/diff/120001/content/common/discardable_shared_memory_heap.cc#newcode406 content/common/discardable_shared_memory_heap.cc:406: // ...
5 years, 4 months ago (2015-07-29 17:04:07 UTC) #7
ssid
Thanks! No problem https://codereview.chromium.org/1259333003/diff/120001/content/common/discardable_shared_memory_heap.cc File content/common/discardable_shared_memory_heap.cc (right): https://codereview.chromium.org/1259333003/diff/120001/content/common/discardable_shared_memory_heap.cc#newcode406 content/common/discardable_shared_memory_heap.cc:406: // kDiscardableSegmentsDumpName as the patent and ...
5 years, 4 months ago (2015-07-29 17:08:37 UTC) #8
ssid
This is to add ownership edges between the skia dumps and and discardable or malloc ...
5 years, 4 months ago (2015-07-29 17:09:25 UTC) #10
ssid
+reed1 -reed2
5 years, 4 months ago (2015-07-29 17:10:32 UTC) #12
reveman
https://codereview.chromium.org/1259333003/diff/160001/base/memory/discardable_shared_memory.cc File base/memory/discardable_shared_memory.cc (right): https://codereview.chromium.org/1259333003/diff/160001/base/memory/discardable_shared_memory.cc#newcode102 base/memory/discardable_shared_memory.cc:102: "discardable/allocated_objects"; same here. I don' think this is the ...
5 years, 4 months ago (2015-07-29 18:32:11 UTC) #13
ssid
Please see comments inline. https://codereview.chromium.org/1259333003/diff/160001/base/memory/discardable_shared_memory.h File base/memory/discardable_shared_memory.h (right): https://codereview.chromium.org/1259333003/diff/160001/base/memory/discardable_shared_memory.h#newcode37 base/memory/discardable_shared_memory.h:37: static const char kAllocatedObjectsDumpName[]; On ...
5 years, 4 months ago (2015-07-29 19:36:23 UTC) #14
reveman
https://codereview.chromium.org/1259333003/diff/160001/skia/ext/skia_memory_dump_provider.cc File skia/ext/skia_memory_dump_provider.cc (right): https://codereview.chromium.org/1259333003/diff/160001/skia/ext/skia_memory_dump_provider.cc#newcode46 skia/ext/skia_memory_dump_provider.cc:46: : base::trace_event::MallocDumpProvider::kAllocatedObjects; On 2015/07/29 at 19:36:22, ssid wrote: > ...
5 years, 4 months ago (2015-07-29 19:59:24 UTC) #15
ssid
On 2015/07/29 19:59:24, reveman wrote: > https://codereview.chromium.org/1259333003/diff/160001/skia/ext/skia_memory_dump_provider.cc > File skia/ext/skia_memory_dump_provider.cc (right): > > https://codereview.chromium.org/1259333003/diff/160001/skia/ext/skia_memory_dump_provider.cc#newcode46 > ...
5 years, 4 months ago (2015-07-29 20:53:18 UTC) #16
ssid
On 2015/07/29 20:53:18, ssid wrote: > On 2015/07/29 19:59:24, reveman wrote: > > > https://codereview.chromium.org/1259333003/diff/160001/skia/ext/skia_memory_dump_provider.cc ...
5 years, 4 months ago (2015-07-29 20:54:52 UTC) #17
reveman
On 2015/07/29 at 20:53:18, ssid wrote: > On 2015/07/29 19:59:24, reveman wrote: > > https://codereview.chromium.org/1259333003/diff/160001/skia/ext/skia_memory_dump_provider.cc ...
5 years, 4 months ago (2015-07-29 21:57:32 UTC) #18
ssid
> hm, I guess we'd have to report total skia usage per segment to avoid ...
5 years, 4 months ago (2015-07-30 13:12:17 UTC) #19
reveman
On 2015/07/30 at 13:12:17, ssid wrote: > > hm, I guess we'd have to report ...
5 years, 4 months ago (2015-07-30 16:00:59 UTC) #20
ssid
Made suggested changes. Thanks > Having this information will be very useful as it shows ...
5 years, 4 months ago (2015-07-30 20:05:16 UTC) #21
reveman
https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardable_memory_allocator.cc File base/memory/discardable_memory_allocator.cc (right): https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardable_memory_allocator.cc#newcode47 base/memory/discardable_memory_allocator.cc:47: pmd->CreateAllocatorDump("discardable/segments"); The use of segments is a detail of ...
5 years, 4 months ago (2015-07-30 21:27:56 UTC) #22
ssid
5 years, 4 months ago (2015-07-31 12:59:41 UTC) #23
Removed the method.

https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardabl...
File base/memory/discardable_memory_allocator.cc (right):

https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardabl...
base/memory/discardable_memory_allocator.cc:47:
pmd->CreateAllocatorDump("discardable/segments");
On 2015/07/30 21:27:56, reveman wrote:
> The use of segments is a detail of the allocator implementation in content/
and
> should not exist here.

Done.

https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardabl...
base/memory/discardable_memory_allocator.cc:53:
discardable_segments_dump->guid());
On 2015/07/30 21:27:56, reveman wrote:
> same here. we shouldn't be referring to segments here.

Done.

https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardabl...
File base/memory/discardable_memory_allocator.h (right):

https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardabl...
base/memory/discardable_memory_allocator.h:30: // Used by other allocators to
expess sub-allocation from discardable memory
On 2015/07/30 21:27:56, reveman wrote:
> express

Done.

https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardabl...
base/memory/discardable_memory_allocator.h:34: //                               
           GetMemoryPoolNameForTracing());
On 2015/07/30 21:27:56, reveman wrote:
> Not sure we need this much detail in this comment. A reference to "skia" in
> base/ feels a bit awkward. How about simply:
> 
> // Returns the memory pool name used by discardable memory allocators for
> tracing purposes.
> 
> 
> and the details for how to use that can be documented somewhere else.

Done.

https://codereview.chromium.org/1259333003/diff/200001/base/memory/discardabl...
base/memory/discardable_memory_allocator.h:43: trace_event::ProcessMemoryDump*
pmd);
On 2015/07/30 21:27:56, reveman wrote:
> Not sure it's worth having this here just for code reuse. See my other
comment.

Moved it to the impl. Thanks

Powered by Google App Engine
This is Rietveld 408576698