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 1391933004: [Tracing] Add hook to PartitionAlloc for heap profiling (Closed)

Created:
5 years, 2 months ago by Ruud van Asseldonk
Modified:
5 years, 2 months ago
CC:
Mads Ager (chromium), blink-reviews, blink-reviews-api_chromium.org, blink-reviews-wtf_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, kouhei+heap_chromium.org, Mikhail, oilpan-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Tracing] Add hook to PartitionAlloc for heap profiling This modifies PartitionAlloc to call a function on allocation and free, which will be used for heap profiling. Care has been taken to impact the fast path as little as possible. https://crbug.com/530502 suggests that there is no significant performance impact. This is part of the heap profiler in chrome://tracing. BUG=524631 Committed: https://crrev.com/65d38472921ad574623410efdfbae840b76fd43e Cr-Commit-Position: refs/heads/master@{#355304}

Patch Set 1 #

Total comments: 32

Patch Set 2 : Address some primiano comments #

Total comments: 12

Patch Set 3 : Address primiano comments #

Total comments: 3

Patch Set 4 : Preemptively address primiano comments #

Total comments: 23

Patch Set 5 : Address review comments #

Total comments: 7

Patch Set 6 : Address haraken comments #

Patch Set 7 : Do check both flags on realloc #

Total comments: 6

Patch Set 8 : Address jl comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -2 lines) Patch
M base/trace_event/memory_dump_manager.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M content/child/web_memory_dump_provider_adapter.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/web_memory_dump_provider_adapter.cc View 1 2 3 4 2 chunks +60 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/PartitionAlloc.h View 1 2 3 4 5 6 7 5 chunks +48 lines, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/PartitionAlloc.cpp View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebMemoryDumpProvider.h View 1 2 3 4 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (11 generated)
Ruud van Asseldonk
5 years, 2 months ago (2015-10-12 15:59:06 UTC) #2
Primiano Tucci (use gerrit)
Many thanks for doing this. Really excited to see this coming. Temporary removing haraken. Rationale: ...
5 years, 2 months ago (2015-10-12 16:36:46 UTC) #4
Ruud van Asseldonk
https://codereview.chromium.org/1391933004/diff/1/base/trace_event/memory_profiler_allocation_context.cc File base/trace_event/memory_profiler_allocation_context.cc (right): https://codereview.chromium.org/1391933004/diff/1/base/trace_event/memory_profiler_allocation_context.cc#newcode35 base/trace_event/memory_profiler_allocation_context.cc:35: i != End(context.backtrace.frames); i++) On 2015/10/12 at 16:36:45, Primiano ...
5 years, 2 months ago (2015-10-13 10:42:18 UTC) #5
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1391933004/diff/1/content/child/web_memory_dump_provider_adapter.cc File content/child/web_memory_dump_provider_adapter.cc (right): https://codereview.chromium.org/1391933004/diff/1/content/child/web_memory_dump_provider_adapter.cc#newcode20 content/child/web_memory_dump_provider_adapter.cc:20: void reportAllocation(void* address, size_t size) { On 2015/10/13 10:42:18, ...
5 years, 2 months ago (2015-10-14 10:10:12 UTC) #6
Ruud van Asseldonk
https://codereview.chromium.org/1391933004/diff/20001/content/child/web_memory_dump_provider_adapter.cc File content/child/web_memory_dump_provider_adapter.cc (right): https://codereview.chromium.org/1391933004/diff/20001/content/child/web_memory_dump_provider_adapter.cc#newcode18 content/child/web_memory_dump_provider_adapter.cc:18: Lock* g_allocation_register_lock; On 2015/10/14 at 10:10:12, Primiano Tucci wrote: ...
5 years, 2 months ago (2015-10-14 12:30:19 UTC) #7
Primiano Tucci (use gerrit)
LGTM. At this point add haraken. Make sure he, or somebody from his team, doublechecks ...
5 years, 2 months ago (2015-10-19 21:32:04 UTC) #9
haraken
Thanks for working on this! https://codereview.chromium.org/1391933004/diff/60001/third_party/WebKit/Source/wtf/PartitionAlloc.cpp File third_party/WebKit/Source/wtf/PartitionAlloc.cpp (right): https://codereview.chromium.org/1391933004/diff/60001/third_party/WebKit/Source/wtf/PartitionAlloc.cpp#newcode1066 third_party/WebKit/Source/wtf/PartitionAlloc.cpp:1066: PartitionAllocHooks::maybeInvokeReallocationHook(ptr, ptr, newSize); You ...
5 years, 2 months ago (2015-10-20 00:14:19 UTC) #11
bashi
https://codereview.chromium.org/1391933004/diff/60001/third_party/WebKit/Source/wtf/PartitionAlloc.h File third_party/WebKit/Source/wtf/PartitionAlloc.h (right): https://codereview.chromium.org/1391933004/diff/60001/third_party/WebKit/Source/wtf/PartitionAlloc.h#newcode425 third_party/WebKit/Source/wtf/PartitionAlloc.h:425: if (UNLIKELY(hook != nullptr)) nit: UNLIKELY(hook). We don't use ...
5 years, 2 months ago (2015-10-20 00:33:49 UTC) #12
haraken
On 2015/10/20 00:33:49, bashi1 wrote: > https://codereview.chromium.org/1391933004/diff/60001/third_party/WebKit/Source/wtf/PartitionAlloc.h > File third_party/WebKit/Source/wtf/PartitionAlloc.h (right): > > https://codereview.chromium.org/1391933004/diff/60001/third_party/WebKit/Source/wtf/PartitionAlloc.h#newcode425 > ...
5 years, 2 months ago (2015-10-20 00:35:42 UTC) #13
bashi
On 2015/10/20 00:35:42, haraken wrote: > On 2015/10/20 00:33:49, bashi1 wrote: > > > https://codereview.chromium.org/1391933004/diff/60001/third_party/WebKit/Source/wtf/PartitionAlloc.h ...
5 years, 2 months ago (2015-10-20 00:38:13 UTC) #14
Ruud van Asseldonk
https://codereview.chromium.org/1391933004/diff/60001/content/child/web_memory_dump_provider_adapter.cc File content/child/web_memory_dump_provider_adapter.cc (right): https://codereview.chromium.org/1391933004/diff/60001/content/child/web_memory_dump_provider_adapter.cc#newcode32 content/child/web_memory_dump_provider_adapter.cc:32: AutoLock guard(g_allocation_register_lock.Get()); On 2015/10/19 at 21:32:03, Primiano Tucci wrote: ...
5 years, 2 months ago (2015-10-20 11:43:57 UTC) #15
haraken
https://codereview.chromium.org/1391933004/diff/80001/third_party/WebKit/Source/wtf/PartitionAlloc.cpp File third_party/WebKit/Source/wtf/PartitionAlloc.cpp (right): https://codereview.chromium.org/1391933004/diff/80001/third_party/WebKit/Source/wtf/PartitionAlloc.cpp#newcode1093 third_party/WebKit/Source/wtf/PartitionAlloc.cpp:1093: PartitionAllocHooks::reallocHookIfEnabled(ptr, ret, newSize); I don't think this is needed ...
5 years, 2 months ago (2015-10-20 12:42:01 UTC) #16
Ruud van Asseldonk
https://codereview.chromium.org/1391933004/diff/80001/third_party/WebKit/Source/wtf/PartitionAlloc.cpp File third_party/WebKit/Source/wtf/PartitionAlloc.cpp (right): https://codereview.chromium.org/1391933004/diff/80001/third_party/WebKit/Source/wtf/PartitionAlloc.cpp#newcode1093 third_party/WebKit/Source/wtf/PartitionAlloc.cpp:1093: PartitionAllocHooks::reallocHookIfEnabled(ptr, ret, newSize); On 2015/10/20 at 12:42:00, haraken wrote: ...
5 years, 2 months ago (2015-10-20 13:22:16 UTC) #17
haraken
https://codereview.chromium.org/1391933004/diff/80001/third_party/WebKit/Source/wtf/PartitionAlloc.h File third_party/WebKit/Source/wtf/PartitionAlloc.h (right): https://codereview.chromium.org/1391933004/diff/80001/third_party/WebKit/Source/wtf/PartitionAlloc.h#newcode441 third_party/WebKit/Source/wtf/PartitionAlloc.h:441: if (UNLIKELY(allocationHook && freeHook)) { On 2015/10/20 13:22:16, Ruud ...
5 years, 2 months ago (2015-10-20 13:25:01 UTC) #18
Ruud van Asseldonk
On 2015/10/20 at 13:25:01, haraken wrote: > Yeah, you're right. Let's check both. Done. > ...
5 years, 2 months ago (2015-10-20 13:31:29 UTC) #19
haraken
On 2015/10/20 13:31:29, Ruud van Asseldonk wrote: > On 2015/10/20 at 13:25:01, haraken wrote: > ...
5 years, 2 months ago (2015-10-20 13:32:40 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1391933004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1391933004/120001
5 years, 2 months ago (2015-10-20 13:34:46 UTC) #23
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/110987)
5 years, 2 months ago (2015-10-20 13:44:17 UTC) #25
Ruud van Asseldonk
jochen@chromium.org: Please review changes in content/child and WebKit/public/platform
5 years, 2 months ago (2015-10-20 14:14:15 UTC) #27
jochen (gone - plz use gerrit)
Jens, can you have a look at this please?
5 years, 2 months ago (2015-10-21 13:32:50 UTC) #29
Jens Widell
https://codereview.chromium.org/1391933004/diff/120001/third_party/WebKit/Source/wtf/PartitionAlloc.h File third_party/WebKit/Source/wtf/PartitionAlloc.h (right): https://codereview.chromium.org/1391933004/diff/120001/third_party/WebKit/Source/wtf/PartitionAlloc.h#newcode717 third_party/WebKit/Source/wtf/PartitionAlloc.h:717: PartitionAllocHooks::freeHookIfEnabled(ptr); In debug, |ptr| here doesn't match what we ...
5 years, 2 months ago (2015-10-21 13:56:51 UTC) #30
Ruud van Asseldonk
https://codereview.chromium.org/1391933004/diff/120001/third_party/WebKit/Source/wtf/PartitionAlloc.h File third_party/WebKit/Source/wtf/PartitionAlloc.h (right): https://codereview.chromium.org/1391933004/diff/120001/third_party/WebKit/Source/wtf/PartitionAlloc.h#newcode717 third_party/WebKit/Source/wtf/PartitionAlloc.h:717: PartitionAllocHooks::freeHookIfEnabled(ptr); On 2015/10/21 13:56:51, Jens Widell wrote: > In ...
5 years, 2 months ago (2015-10-21 15:00:28 UTC) #31
Jens Widell
PartitionAlloc changes LGTM.
5 years, 2 months ago (2015-10-21 15:15:15 UTC) #32
jochen (gone - plz use gerrit)
lgtm
5 years, 2 months ago (2015-10-21 15:19:58 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1391933004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1391933004/140001
5 years, 2 months ago (2015-10-21 15:22:03 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 2 months ago (2015-10-21 16:13:23 UTC) #37
commit-bot: I haz the power
5 years, 2 months ago (2015-10-21 16:14:16 UTC) #38
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/65d38472921ad574623410efdfbae840b76fd43e
Cr-Commit-Position: refs/heads/master@{#355304}

Powered by Google App Engine
This is Rietveld 408576698