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

Issue 1839503002: [tracing] Add native allocation tracing mode. (Closed)

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

Description

[tracing] Add native allocation tracing mode. This change adds 'native' mode to '--enable-heap-profiling' option. When started with '--enable-heap-profiling=native' Chrome will keep native (real) stack traces for all live allocations. These native stack traces are then dumped to a trace file if 'memory-infra' category is enabled. Stack traces are dumped unsymbolized (for performance reasons), and there is a script (third_party/catapult/tracing/bin/symbolize_trace) that symbolizes all stack traces in a given trace file. Design document: https://goo.gl/DFoqfi Note: native stack tracing relies on frame pointers. You'll need to use either debug or a profiling release build (enable_profiling = true). Note: for now this all works on Linux @ x86/x64 only. BUG=602701 Committed: https://crrev.com/5a05938adaabf413a40f1e0dfec3d1e4c683693a Cr-Commit-Position: refs/heads/master@{#389500}

Patch Set 1 #

Patch Set 2 : Fix startup tracing #

Patch Set 3 : WalkStackFrames (wants frame pointers) #

Total comments: 13

Patch Set 4 : rebase #

Patch Set 5 : --enable-heap-profiling=native; misc cleanups #

Patch Set 6 : Add type to StackFrame; format thread name #

Total comments: 30

Patch Set 7 : Address comments; fix unittests #

Patch Set 8 : rebase #

Patch Set 9 : rebase #

Patch Set 10 : Revert whitespace change in malloc_dump_provider #

Total comments: 15

Patch Set 11 : Address comments #

Total comments: 11

Patch Set 12 : rebase #

Patch Set 13 : Address comment #

Patch Set 14 : rebase #

Patch Set 15 : Increase Backtrace frames, request even more frames #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -53 lines) Patch
M base/base_switches.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M base/base_switches.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M base/trace_event/heap_profiler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -4 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +10 lines, -6 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context_tracker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +30 lines, -13 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 11 12 13 14 3 chunks +61 lines, -20 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -2 lines 0 comments Download
M base/trace_event/heap_profiler_stack_frame_deduplicator.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M base/trace_event/memory_dump_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +20 lines, -1 line 0 comments Download
M base/trace_event/trace_event.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -4 lines 0 comments Download
M base/trace_event/trace_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 45 (19 generated)
Dmitry Skiba
4 years, 8 months ago (2016-03-28 19:04:32 UTC) #4
Primiano Tucci (use gerrit)
Thanks a lot for looking at this. this was quick. the approach from the tracing ...
4 years, 8 months ago (2016-04-01 15:56:29 UTC) #6
Dmitry Skiba
https://codereview.chromium.org/1839503002/diff/40001/base/trace_event/heap_profiler_allocation_context.h File base/trace_event/heap_profiler_allocation_context.h (right): https://codereview.chromium.org/1839503002/diff/40001/base/trace_event/heap_profiler_allocation_context.h#newcode40 base/trace_event/heap_profiler_allocation_context.h:40: enum StackFrameType { On 2016/04/01 15:56:28, Primiano Tucci wrote: ...
4 years, 8 months ago (2016-04-04 22:38:34 UTC) #7
Primiano Tucci (use gerrit)
Ok this makes great sense to me. Thanks so much for doing this. I have ...
4 years, 8 months ago (2016-04-07 15:51:57 UTC) #10
Primiano Tucci (use gerrit)
Another thing came to my mind: wouldn't it be better to store relative PC addresses ...
4 years, 8 months ago (2016-04-07 15:57:01 UTC) #11
Primiano Tucci (use gerrit)
On 2016/04/07 15:57:01, Primiano Tucci wrote: > Another thing came to my mind: wouldn't it ...
4 years, 8 months ago (2016-04-07 16:06:13 UTC) #12
Dmitry Skiba
https://codereview.chromium.org/1839503002/diff/60002/base/base_switches.cc File base/base_switches.cc (right): https://codereview.chromium.org/1839503002/diff/60002/base/base_switches.cc#newcode23 base/base_switches.cc:23: // Report native (walk the stack) allocation traces. By ...
4 years, 8 months ago (2016-04-12 18:22:11 UTC) #14
ssid
Not sure if i understand correctly, but shouldn't this cl be titled in the lines ...
4 years, 8 months ago (2016-04-13 22:00:26 UTC) #16
Primiano Tucci (use gerrit)
On 2016/04/13 22:00:26, ssid wrote: > Not sure if i understand correctly, but shouldn't this ...
4 years, 8 months ago (2016-04-14 19:38:11 UTC) #17
Dmitry Skiba
This review was rebased on top of two others: [tracing] Turn StackFrame into struct. https://codereview.chromium.org/1891543003/ ...
4 years, 8 months ago (2016-04-19 15:45:44 UTC) #19
Dmitry Skiba
Mark, please review changes in base_switches.h/cc
4 years, 8 months ago (2016-04-19 15:47:55 UTC) #21
Primiano Tucci (use gerrit)
//base/trace_event makes sense to me. Some comments, but overall LG. Will stamp once the dependent ...
4 years, 8 months ago (2016-04-19 20:15:20 UTC) #22
Mark Mentovai
LGTM in base, limited to base/base_switches.*. Please obtain LGTM from an OWNER of base/trace_event before ...
4 years, 8 months ago (2016-04-19 20:17:10 UTC) #23
Dmitry Skiba
https://codereview.chromium.org/1839503002/diff/170001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/1839503002/diff/170001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode19 base/trace_event/heap_profiler_allocation_context_tracker.cc:19: static_cast<int>(AllocationContextTracker::CaptureMode::DISABLED); On 2016/04/19 20:15:19, Primiano Tucci wrote: > s/int/int32_t/ ...
4 years, 8 months ago (2016-04-20 19:19:25 UTC) #24
Primiano Tucci (use gerrit)
LGTM with comment addressed. Please just have ssid cross-check your CL and LGTM it before ...
4 years, 8 months ago (2016-04-21 20:08:21 UTC) #25
Dmitry Skiba
https://codereview.chromium.org/1839503002/diff/190001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/1839503002/diff/190001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode159 base/trace_event/heap_profiler_allocation_context_tracker.cc:159: backtrace_end - backtrace, On 2016/04/21 20:08:21, Primiano Tucci wrote: ...
4 years, 8 months ago (2016-04-22 06:31:15 UTC) #26
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1839503002/diff/190001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/1839503002/diff/190001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode159 base/trace_event/heap_profiler_allocation_context_tracker.cc:159: backtrace_end - backtrace, On 2016/04/22 06:31:15, Dmitry Skiba wrote: ...
4 years, 8 months ago (2016-04-22 09:02:46 UTC) #27
Primiano Tucci (use gerrit)
PS15 LGTM
4 years, 8 months ago (2016-04-25 15:18:25 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839503002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839503002/270001
4 years, 8 months ago (2016-04-25 15:24:17 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-generic_chromium_compile_only_ng/builds/127123)
4 years, 8 months ago (2016-04-25 15:30:09 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839503002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839503002/270001
4 years, 8 months ago (2016-04-25 15:31:59 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-generic_chromium_compile_only_ng/builds/127131)
4 years, 8 months ago (2016-04-25 15:37:51 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839503002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839503002/270001
4 years, 8 months ago (2016-04-25 16:01:51 UTC) #40
commit-bot: I haz the power
Committed patchset #15 (id:270001)
4 years, 8 months ago (2016-04-25 16:48:04 UTC) #42
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/5a05938adaabf413a40f1e0dfec3d1e4c683693a Cr-Commit-Position: refs/heads/master@{#389500}
4 years, 8 months ago (2016-04-25 16:49:13 UTC) #44
Charlie Reis
4 years, 8 months ago (2016-04-25 17:12:05 UTC) #45
Message was sent while issue was closed.
A revert of this CL (patchset #15 id:270001) has been created in
https://codereview.chromium.org/1916033002/ by creis@chromium.org.

The reason for reverting is: Appears to have caused a compile error on
https://build.chromium.org/p/chromium/builders/Win%20x64/builds/92..

Powered by Google App Engine
This is Rietveld 408576698