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

Issue 1494293005: [Tracing] Enable heap dumps with both type info and backtraces (Closed)

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

Description

[Tracing] Enable heap dumps with both type info and backtraces This is a major change to |HeapDumpWriter| which enables it to dump the format described in https://goo.gl/KY7zVE. This will allow the heap profiler to break down the heap by type or backtrace, but also combinations of those. This changes the interface of |HeapDumpWriter| slightly from a two-step process (insert allocations, dump json) to a three-step process (insert allocations, compute what to dump, convert to json). The main reason for doing this is testability. Aggregation and json conversion are now completely orthogonal. This means that the aggregation algorithm can be tested without having to parse the json first, and the json conversion is simpler to test too. This is part of the heap profiler in chrome://tracing. BUG=524631 Committed: https://crrev.com/3314e2e367138427f3aaccd3da030413c045ab56 Cr-Commit-Position: refs/heads/master@{#364444}

Patch Set 1 #

Total comments: 2

Patch Set 2 : 32-bit is still a thing #

Total comments: 36

Patch Set 3 : Address petrcermak comments #

Patch Set 4 : Avoid reuse and generic code, opt for less helper structs instead #

Total comments: 28

Patch Set 5 : Address most primiano comments #

Total comments: 12

Patch Set 6 : Alternative to patchset 5 #

Patch Set 7 : IWYU #

Total comments: 25

Patch Set 8 : Address primiano comments #

Patch Set 9 : Rename _all_ occurrences #

Unified diffs Side-by-side diffs Delta from patch set Stats (+453 lines, -269 lines) Patch
M base/trace_event/heap_profiler_allocation_context.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/trace_event/heap_profiler_heap_dump_writer.h View 1 2 3 4 5 6 7 8 4 chunks +52 lines, -30 lines 0 comments Download
M base/trace_event/heap_profiler_heap_dump_writer.cc View 1 2 3 4 5 6 7 8 1 chunk +244 lines, -81 lines 0 comments Download
M base/trace_event/heap_profiler_heap_dump_writer_unittest.cc View 1 2 3 4 5 6 7 4 chunks +148 lines, -151 lines 0 comments Download
M content/child/web_memory_dump_provider_adapter.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -5 lines 0 comments Download

Messages

Total messages: 20 (5 generated)
Ruud van Asseldonk
This changes the meaning of the the dumped values, so it should not land until ...
5 years ago (2015-12-04 16:31:52 UTC) #2
petrcermak
Looks really good overall! Here's just a couple of minor comments. Thanks, Petr https://codereview.chromium.org/1494293005/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc File ...
5 years ago (2015-12-04 19:13:20 UTC) #3
Ruud van Asseldonk
Thank you for the detailed feedback. Please take another look. https://codereview.chromium.org/1494293005/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc File base/trace_event/heap_profiler_heap_dump_writer.cc (right): https://codereview.chromium.org/1494293005/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc#newcode21 ...
5 years ago (2015-12-07 13:54:00 UTC) #4
Ruud van Asseldonk
After offline discussion, I removed the helper structs (Slice and Part) in favour of |std::pair|. ...
5 years ago (2015-12-08 15:10:24 UTC) #5
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1494293005/diff/60001/base/trace_event/heap_profiler_heap_dump_writer.cc File base/trace_event/heap_profiler_heap_dump_writer.cc (right): https://codereview.chromium.org/1494293005/diff/60001/base/trace_event/heap_profiler_heap_dump_writer.cc#newcode40 base/trace_event/heap_profiler_heap_dump_writer.cc:40: enum class Property { kBacktrace, kTypeName }; nit: s/Property/BreakdownMode/ ...
5 years ago (2015-12-08 18:05:30 UTC) #6
Ruud van Asseldonk
I addressed most comments, but threading |entries| through all functions as argument instead of making ...
5 years ago (2015-12-09 14:07:54 UTC) #7
petrcermak
LGTM with a few more comments. I agree with you that the original version was ...
5 years ago (2015-12-09 15:02:32 UTC) #8
Ruud van Asseldonk
I gave it another try, mostly similar to patchset 4 but with the |HeapDumper| class ...
5 years ago (2015-12-09 16:16:01 UTC) #9
Primiano Tucci (use gerrit)
LGTM with some (Really) minor comments. Many thanks for the patience, I know this took ...
5 years ago (2015-12-09 17:04:00 UTC) #10
Ruud van Asseldonk
https://codereview.chromium.org/1494293005/diff/120001/base/trace_event/heap_profiler_allocation_context.h File base/trace_event/heap_profiler_allocation_context.h (right): https://codereview.chromium.org/1494293005/diff/120001/base/trace_event/heap_profiler_allocation_context.h#newcode85 base/trace_event/heap_profiler_allocation_context.h:85: struct BASE_EXPORT hash<base::trace_event::Backtrace> { On 2015/12/09 17:03:59, Primiano Tucci ...
5 years ago (2015-12-09 20:58:05 UTC) #11
Ruud van Asseldonk
+jam, can you please take a look at this small change in content/child?
5 years ago (2015-12-09 21:00:27 UTC) #13
jam
lgtm
5 years ago (2015-12-10 03:07:19 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494293005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494293005/160001
5 years ago (2015-12-10 19:39:31 UTC) #17
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years ago (2015-12-10 19:54:51 UTC) #18
commit-bot: I haz the power
5 years ago (2015-12-10 19:56:10 UTC) #20
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/3314e2e367138427f3aaccd3da030413c045ab56
Cr-Commit-Position: refs/heads/master@{#364444}

Powered by Google App Engine
This is Rietveld 408576698