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

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

Created:
3 years, 8 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

Revert of Cleaner fall-back stack capture for --enable-heap-profiling=native. (patchset #4 id:80001 of https://codereview.chromium.org/2757123002/ ) Reason for revert: Broke Chrome for Android official builds (see crbug.com/706698), due to new dependency on debugging_flags.h header. Original issue's 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 HAVE_TRACE_STACK_FRAME_POINTERS(). > 3. HAVE_STACK_FRAME_POINTERS is no longer defined in configurations > which lack frame pointers[2]. > > [1] Though note that only certain build configs actually support > the necessary allocator shims; this will be addressed later. > [2] Frame pointers are typically only available in enable_profiling > or Debug builds. > > BUG=686208 > > Review-Url: https://codereview.chromium.org/2757123002 > Cr-Commit-Position: refs/heads/master@{#460311} > Committed: https://chromium.googlesource.com/chromium/src/+/22b017b9b241c47db8cf25c57c89c0b0d7fcfbe2 TBR=dskiba@chromium.org,primiano@chromium.org,dcheng@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=686208 Review-Url: https://codereview.chromium.org/2790443002 Cr-Commit-Position: refs/heads/master@{#460679} Committed: https://chromium.googlesource.com/chromium/src/+/3731f7d26c0d826826453efc211d7902bc61e3d9

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -54 lines) Patch
M base/android/jni_android.cc View 4 chunks +4 lines, -3 lines 0 comments Download
M base/debug/stack_trace.h View 4 chunks +11 lines, -14 lines 0 comments Download
M base/debug/stack_trace.cc View 5 chunks +19 lines, -4 lines 0 comments Download
M base/debug/stack_trace_unittest.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context_tracker.cc View 1 chunk +23 lines, -27 lines 0 comments Download
M base/trace_event/memory_dump_manager.cc View 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Wez
Created Revert of Cleaner fall-back stack capture for --enable-heap-profiling=native.
3 years, 8 months ago (2017-03-30 06:21:49 UTC) #2
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/2790443002/1
3 years, 8 months ago (2017-03-30 06:22:10 UTC) #3
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/3731f7d26c0d826826453efc211d7902bc61e3d9
3 years, 8 months ago (2017-03-30 06:24:07 UTC) #6
Primiano Tucci (use gerrit)
On 2017/03/30 06:24:07, commit-bot: I haz the power wrote: > Committed patchset #1 (id:1) as ...
3 years, 8 months ago (2017-03-30 11:52:22 UTC) #7
Wez
3 years, 8 months ago (2017-03-31 05:44:21 UTC) #8
Message was sent while issue was closed.
On 2017/03/30 11:52:22, Primiano Tucci wrote:
> On 2017/03/30 06:24:07, commit-bot: I haz the power wrote:
> > Committed patchset #1 (id:1) as
> >
>
https://chromium.googlesource.com/chromium/src/+/3731f7d26c0d826826453efc211d...
> 
> Blast from the past, I've seen this revert for this reason before :)
> 
> I guess you missed dskiba's comment in crrev.com/2757123002 (the original CL)
> about not include  #include "base/debug/debugging_flags.h" in the header,
> because, quoting
> dskiba@
> ---
> Another thing is that last time I tried to use BUILDFLAG(ENABLE_PROFILING) in
a
> base/ header, I ended up in misery, because debugging_flags.h is generated
when
> base/ is built, but there is nothing preventing ninja from starting building
> both foo/ (which depend on base/) and base/ at the same time. If something in
> foo/ includes stack_trace.h and depends on HAVE_STACK_FRAME_POINTERS we end up
> with non-deterministic build.
> ---

Yes, I noticed that comment, but it didn't make a lot of sense to me, since we
have other situations in which we have public headers include generated headers,
and that is apparently OK - e.g. see
https://cs.chromium.org/chromium/src/content/public/common/BUILD.gn?type=cs&q....
 Both cases involve a public_deps on a step that generates a header.

I think the problem is that mojom(...) templates generate a source_set() which
has the generated files as its |sources|, and then depends on the generator.  So
the buildflag_header(...) should be fixable to do the same thing.
Is there something different in the build-flags rule vs the mojom rule that
causes the dependency not to work, or is there something else I'm missing here?

Powered by Google App Engine
This is Rietveld 408576698