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

Issue 1859143003: Handle zero-size allocations properly in heap profiler (Closed)

Created:
4 years, 8 months ago by kraynov
Modified:
4 years, 8 months ago
CC:
chromium-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

Handle zero-size allocations properly in heap profiler Now zero-size allocations are ignored for heap profiling. Percentage calculation is originally changed to avoid div-by-zero, but it also solves integer overflow issue with >32768 Kb allocations on platforms with 32-bit size_t. Committed: https://crrev.com/a29434e19fa91646e9c40afa5078e64e0ae73903 Cr-Commit-Position: refs/heads/master@{#385426}

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 2

Patch Set 7 : Typo #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -19 lines) Patch
M base/trace_event/heap_profiler_allocation_register.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_register_unittest.cc View 1 2 3 4 5 6 7 7 chunks +14 lines, -11 lines 0 comments Download
M base/trace_event/heap_profiler_heap_dump_writer.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -8 lines 0 comments Download

Messages

Total messages: 21 (10 generated)
kraynov-google
Please take a look
4 years, 8 months ago (2016-04-05 17:14:02 UTC) #4
Primiano Tucci (use gerrit)
Many thanks for looking at this. I think this is a consequence of something that ...
4 years, 8 months ago (2016-04-05 17:26:40 UTC) #6
kraynov-google
Updated
4 years, 8 months ago (2016-04-05 18:22:11 UTC) #8
Primiano Tucci (use gerrit)
LGTM with comments addressed. https://codereview.chromium.org/1859143003/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/1859143003/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc#newcode73 base/trace_event/heap_profiler_heap_dump_writer.cc:73: DCHECK(context_and_size.second > 0); I think ...
4 years, 8 months ago (2016-04-05 18:38:48 UTC) #9
Dmitry Skiba
https://codereview.chromium.org/1859143003/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc File base/trace_event/heap_profiler_heap_dump_writer.cc (left): https://codereview.chromium.org/1859143003/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc#oldcode144 base/trace_event/heap_profiler_heap_dump_writer.cc:144: size_t contribution = buckets.front().size * 125 / accounted_for; With ...
4 years, 8 months ago (2016-04-05 18:54:14 UTC) #11
kraynov-google
On 2016/04/05 18:54:14, Dmitry Skiba wrote: > https://codereview.chromium.org/1859143003/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc > File base/trace_event/heap_profiler_heap_dump_writer.cc (left): > > https://codereview.chromium.org/1859143003/diff/20001/base/trace_event/heap_profiler_heap_dump_writer.cc#oldcode144 ...
4 years, 8 months ago (2016-04-05 19:09:40 UTC) #12
kraynov-google
Take a look please, btw, tests are fixed
4 years, 8 months ago (2016-04-05 22:14:05 UTC) #13
Primiano Tucci (use gerrit)
PS6 LGTM with two comments addressed Ah, can you also add a "tracing: " prefix ...
4 years, 8 months ago (2016-04-06 08:20:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1859143003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1859143003/140001
4 years, 8 months ago (2016-04-06 08:43:45 UTC) #17
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-04-06 09:53:44 UTC) #19
commit-bot: I haz the power
4 years, 8 months ago (2016-04-06 09:54:47 UTC) #21
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/a29434e19fa91646e9c40afa5078e64e0ae73903
Cr-Commit-Position: refs/heads/master@{#385426}

Powered by Google App Engine
This is Rietveld 408576698