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

Issue 1675183006: tracing: add dump provider for malloc heap profiler (Closed)

Created:
4 years, 10 months ago by Primiano Tucci (use gerrit)
Modified:
4 years, 8 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, Dai Mikurube (NOT FULLTIME), vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@shim_layer_linux
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

tracing: add dump provider for malloc heap profiler Now that the allocator shim is landing (the base API landed in crre.com/1675143004, Linux support in crrev.com/1781573002) we can use that to implement the malloc heap profiler on top of that. This CL leverages the new shim API to collect information about malloc/free and injecting that into the heap profiler, leveraging the same infrastructure we are already using for PartitionAlloc and BlinkGC (oilpan). Next steps ---------- Currently this heap profiler reports also the memory used by the tracing subsystem itself, which is not desirable. Will come up with some scoped suppression semantic to bypass the reporting. BUG=550886 TBR=haraken Committed: https://crrev.com/14c8b52dac1285bbf23514d05e6109aa7edc427f Cr-Commit-Position: refs/heads/master@{#382505}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : ifdef_guards #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Patch Set 6 : rebase #

Patch Set 7 : ifdef when not used #

Patch Set 8 : production version #

Total comments: 34

Patch Set 9 : Petrcermak review #

Patch Set 10 : add comment #

Total comments: 9

Patch Set 11 : ssid review #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -37 lines) Patch
M base/trace_event/heap_profiler_allocation_context_tracker.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -5 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context_tracker.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +24 lines, -18 lines 1 comment Download
M base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +12 lines, -4 lines 0 comments Download
M base/trace_event/malloc_dump_provider.h View 1 2 3 4 5 6 7 8 3 chunks +21 lines, -0 lines 0 comments Download
M base/trace_event/malloc_dump_provider.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +159 lines, -1 line 0 comments Download
M base/trace_event/trace_log.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -5 lines 0 comments Download
M components/tracing/docs/heap_profiler_internals.md View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 32 (13 generated)
Primiano Tucci (use gerrit)
PTAL!
4 years, 9 months ago (2016-03-10 15:49:44 UTC) #5
petrcermak
Looks good overall. Here's a couple of comments. Thanks, Petr https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode23 ...
4 years, 9 months ago (2016-03-11 11:09:24 UTC) #6
Primiano Tucci (use gerrit)
Uberthanks, -pedantic as usual. See replies inline https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode23 base/trace_event/heap_profiler_allocation_context_tracker.cc:23: reinterpret_cast<AllocationContextTracker*>(-1); On ...
4 years, 9 months ago (2016-03-11 13:57:57 UTC) #7
petrcermak
LGTM with one more comment. Thanks, Petr https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/malloc_dump_provider.cc File base/trace_event/malloc_dump_provider.cc (right): https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/malloc_dump_provider.cc#newcode200 base/trace_event/malloc_dump_provider.cc:200: overhead.DumpInto("tracing/heap_profiler_malloc", pmd); ...
4 years, 9 months ago (2016-03-11 14:26:31 UTC) #8
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/malloc_dump_provider.cc File base/trace_event/malloc_dump_provider.cc (right): https://codereview.chromium.org/1675183006/diff/140001/base/trace_event/malloc_dump_provider.cc#newcode253 base/trace_event/malloc_dump_provider.cc:253: AutoLock lock(allocation_register_lock_); On 2016/03/11 14:26:31, petrcermak wrote: > On ...
4 years, 9 months ago (2016-03-11 16:57:22 UTC) #9
ssid
lgtm A few comments to think about, i don't have a strong preference. https://codereview.chromium.org/1675183006/diff/180001/base/trace_event/heap_profiler_allocation_context_tracker.cc File ...
4 years, 9 months ago (2016-03-11 19:51:10 UTC) #10
Dmitry Skiba
https://codereview.chromium.org/1675183006/diff/180001/base/trace_event/malloc_dump_provider.cc File base/trace_event/malloc_dump_provider.cc (right): https://codereview.chromium.org/1675183006/diff/180001/base/trace_event/malloc_dump_provider.cc#newcode217 base/trace_event/malloc_dump_provider.cc:217: // Insert/RemoveAllocation below will no-op if the register is ...
4 years, 9 months ago (2016-03-15 19:36:03 UTC) #12
Primiano Tucci (use gerrit)
Thanks all for the comment. I reworked the AllocationContextTracker to have a GetInstanceForCurrentThread() method which ...
4 years, 9 months ago (2016-03-21 19:29:24 UTC) #13
ssid
lgtm. thanks the only bit that looks awkward is that the GetInstance can return nullptr, ...
4 years, 9 months ago (2016-03-22 00:37:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1675183006/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1675183006/200001
4 years, 9 months ago (2016-03-22 02:01:04 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/159499)
4 years, 9 months ago (2016-03-22 02:11:21 UTC) #19
Primiano Tucci (use gerrit)
+TBR haraken for two small changes (+GetInstance) to the dump providers in PartitionAllocMemoryDumpProvider and BlinkGCDumpProvider
4 years, 9 months ago (2016-03-22 04:00:27 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1675183006/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1675183006/200001
4 years, 9 months ago (2016-03-22 04:00:39 UTC) #24
haraken
WebKit LGTM
4 years, 9 months ago (2016-03-22 04:01:00 UTC) #25
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 9 months ago (2016-03-22 04:05:32 UTC) #27
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/14c8b52dac1285bbf23514d05e6109aa7edc427f Cr-Commit-Position: refs/heads/master@{#382505}
4 years, 9 months ago (2016-03-22 04:07:02 UTC) #29
gab
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.chromium.org/1822013002/ by gab@chromium.org. ...
4 years, 9 months ago (2016-03-22 13:47:20 UTC) #30
Dmitry Skiba
https://codereview.chromium.org/1675183006/diff/180001/base/trace_event/malloc_dump_provider.cc File base/trace_event/malloc_dump_provider.cc (right): https://codereview.chromium.org/1675183006/diff/180001/base/trace_event/malloc_dump_provider.cc#newcode217 base/trace_event/malloc_dump_provider.cc:217: // Insert/RemoveAllocation below will no-op if the register is ...
4 years, 9 months ago (2016-03-22 19:23:40 UTC) #31
Primiano Tucci (use gerrit)
4 years, 8 months ago (2016-03-31 14:55:44 UTC) #32
Message was sent while issue was closed.
FTR this was relanded in https://codereview.chromium.org/1831763003/

Powered by Google App Engine
This is Rietveld 408576698