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

Issue 2757123002: Cleaner fall-back stack capture for --enable-heap-profiling=native. (Closed)

Created:
3 years, 9 months ago by Wez
Modified:
3 years, 8 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleaner fall-back stack capture for --enable-heap-profiling=native. This generalizes the fall-back to using base::debug::StackTrace to capture stack traces in builds which lack frame pointers, allowing native heap profiling to generate useful data, albeit with a more significant performance penalty. Changes made in the earlier patch for native heap profiling stack capture under Windows are un-done in favour of the following: 1. MemoryDumpManager always allows native heap profiling[1]. 2. HeapProfilerAllocationContextTracker chooses whether to use base::debug::StackTrace or TraceStackFramePointers() based on the value of BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS). 3. BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS) is no longer defined in configurations which we cannot use frame pointers for unwinding[2]. [1] Though note that only certain build configs actually support the necessary allocator shims; this will be addressed later. [2] Frame pointers are only available in profiling & Debug builds on some platforms, and are available but unsuitable for us to use for stack unwinding, on others. BUG=686208 Review-Url: https://codereview.chromium.org/2757123002 Cr-Original-Commit-Position: refs/heads/master@{#460311} Committed: https://chromium.googlesource.com/chromium/src/+/22b017b9b241c47db8cf25c57c89c0b0d7fcfbe2 Review-Url: https://codereview.chromium.org/2757123002 Cr-Commit-Position: refs/heads/master@{#463411} Committed: https://chromium.googlesource.com/chromium/src/+/460b12442f72be8185a80cbf1ec0be6d11a27515

Patch Set 1 #

Patch Set 2 : Clean up macro #

Patch Set 3 : Fix OS_NACL #

Total comments: 6

Patch Set 4 : Revert to non-function-style macro #

Total comments: 2

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase and cleanup #

Total comments: 2

Patch Set 8 : Disable native heap profiling option under NaCl #

Total comments: 2

Patch Set 9 : Fix comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -43 lines) Patch
M base/debug/stack_trace.h View 1 2 3 4 5 6 2 chunks +0 lines, -2 lines 0 comments Download
M base/debug/stack_trace.cc View 1 2 3 4 5 6 5 chunks +2 lines, -17 lines 0 comments Download
M base/debug/stack_trace_unittest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -5 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context_tracker.cc View 1 2 3 4 5 6 2 chunks +12 lines, -8 lines 0 comments Download
M base/trace_event/memory_dump_manager.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -5 lines 0 comments Download
M build/config/compiler/compiler.gni View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -6 lines 0 comments Download

Messages

Total messages: 79 (53 generated)
Wez
PTAL - cleanup of my earlier patch to make --enable-heap-profiling=native more widely available (even if ...
3 years, 9 months ago (2017-03-22 00:01:17 UTC) #10
Primiano Tucci (use gerrit)
defer the actual changes in base/debug to dskiba, who wrote the linux/android part/ and base ...
3 years, 9 months ago (2017-03-22 10:38:35 UTC) #12
DmitrySkiba
I have several questions: 1. Why HAVE_STACK_FRAME_POINTERS was converted into a function-style macro? I modeled ...
3 years, 9 months ago (2017-03-23 19:10:24 UTC) #13
Wez
On 2017/03/23 19:10:24, DmitrySkiba wrote: > I have several questions: > > 1. Why HAVE_STACK_FRAME_POINTERS ...
3 years, 8 months ago (2017-03-27 03:52:19 UTC) #14
Wez
https://codereview.chromium.org/2757123002/diff/40001/base/debug/stack_trace.h File base/debug/stack_trace.h (right): https://codereview.chromium.org/2757123002/diff/40001/base/debug/stack_trace.h#newcode34 base/debug/stack_trace.h:34: #define HAVE_TRACE_STACK_FRAME_POINTERS() 1 FYI: Turned this back into a ...
3 years, 8 months ago (2017-03-27 03:59:37 UTC) #16
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2757123002/diff/40001/base/trace_event/memory_dump_manager.cc File base/trace_event/memory_dump_manager.cc (right): https://codereview.chromium.org/2757123002/diff/40001/base/trace_event/memory_dump_manager.cc#newcode191 base/trace_event/memory_dump_manager.cc:191: } else if (profiling_mode == switches::kEnableHeapProfilingModeNative) { On 2017/03/27 ...
3 years, 8 months ago (2017-03-27 09:42:47 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2757123002/80001
3 years, 8 months ago (2017-03-28 02:54:20 UTC) #25
Wez
dcheng: Could you provide OWNERS for base/[debug]/, plz?
3 years, 8 months ago (2017-03-28 05:19:53 UTC) #27
dcheng
LGTM with two questions https://codereview.chromium.org/2757123002/diff/80001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/2757123002/diff/80001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode219 base/trace_event/heap_profiler_allocation_context_tracker.cc:219: const void* const* frames = ...
3 years, 8 months ago (2017-03-28 06:16:23 UTC) #28
Wez
https://codereview.chromium.org/2757123002/diff/80001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/2757123002/diff/80001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode219 base/trace_event/heap_profiler_allocation_context_tracker.cc:219: const void* const* frames = stack_trace.Addresses(&frame_count); On 2017/03/28 06:16:23, ...
3 years, 8 months ago (2017-03-28 06:38:22 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2757123002/80001
3 years, 8 months ago (2017-03-29 04:55:32 UTC) #32
commit-bot: I haz the power
Committed patchset #4 (id:80001) as https://chromium.googlesource.com/chromium/src/+/22b017b9b241c47db8cf25c57c89c0b0d7fcfbe2
3 years, 8 months ago (2017-03-29 07:14:40 UTC) #35
Wez
A revert of this CL (patchset #4 id:80001) has been created in https://codereview.chromium.org/2790443002/ by wez@chromium.org. ...
3 years, 8 months ago (2017-03-30 06:21:48 UTC) #36
Wez
On 2017/03/30 06:21:48, Wez wrote: > A revert of this CL (patchset #4 id:80001) has ...
3 years, 8 months ago (2017-04-05 22:14:56 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2757123002/140001
3 years, 8 months ago (2017-04-06 17:26:35 UTC) #53
commit-bot: I haz the power
Failed to apply patch for base/android/jni_android.cc: While running git apply --index -3 -p1; error: patch ...
3 years, 8 months ago (2017-04-06 21:23:42 UTC) #56
Wez
dcheng: FYI this CL seems to confuse git cl format with the change in heap_profiler_allocation_context_tracker, ...
3 years, 8 months ago (2017-04-07 01:22:07 UTC) #59
Wez
erikchen: PTAL at the migration of the OS_WIN checks into the .gn. brettw: OWNERS for ...
3 years, 8 months ago (2017-04-07 01:25:56 UTC) #61
erikchen
Nice clean up, thanks. commit message is out of date. otherwise lgtm. https://codereview.chromium.org/2757123002/diff/160001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc ...
3 years, 8 months ago (2017-04-07 01:47:43 UTC) #62
Wez
FYI https://codereview.chromium.org/2757123002/diff/160001/base/trace_event/heap_profiler_allocation_context_tracker.cc File base/trace_event/heap_profiler_allocation_context_tracker.cc (right): https://codereview.chromium.org/2757123002/diff/160001/base/trace_event/heap_profiler_allocation_context_tracker.cc#newcode232 base/trace_event/heap_profiler_allocation_context_tracker.cc:232: #endif // !defined(OS_NACL) On 2017/04/07 01:47:43, erikchen wrote: ...
3 years, 8 months ago (2017-04-08 00:11:32 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2757123002/180001
3 years, 8 months ago (2017-04-08 00:12:17 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/406125)
3 years, 8 months ago (2017-04-08 00:21:44 UTC) #71
brettw
lgtm https://codereview.chromium.org/2757123002/diff/180001/build/config/compiler/compiler.gni File build/config/compiler/compiler.gni (right): https://codereview.chromium.org/2757123002/diff/180001/build/config/compiler/compiler.gni#newcode95 build/config/compiler/compiler.gni:95: # Windows 32-bit does provide frame pointers, but ...
3 years, 8 months ago (2017-04-10 18:29:35 UTC) #72
Wez
https://codereview.chromium.org/2757123002/diff/180001/build/config/compiler/compiler.gni File build/config/compiler/compiler.gni (right): https://codereview.chromium.org/2757123002/diff/180001/build/config/compiler/compiler.gni#newcode95 build/config/compiler/compiler.gni:95: # Windows 32-bit does provide frame pointers, but the ...
3 years, 8 months ago (2017-04-10 18:49:10 UTC) #73
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2757123002/200001
3 years, 8 months ago (2017-04-10 18:50:37 UTC) #76
commit-bot: I haz the power
3 years, 8 months ago (2017-04-10 21:56:35 UTC) #79
Message was sent while issue was closed.
Committed patchset #9 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/460b12442f72be8185a80cbf1ec0...

Powered by Google App Engine
This is Rietveld 408576698