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

Issue 2707223002: Make --enable-heap-profiling=native "work" on Windows. (Closed)

Created:
3 years, 10 months ago by Wez
Modified:
3 years, 9 months ago
Reviewers:
brettw, awong, dcheng, etienneb
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make --enable-heap-profiling=native "work" on Windows. Three small changes to get things "working"[1]: 1. Implement TraceStackFramePointers using StackTrace, under OS_WIN. 2. Add compile flag to enable frame pointers. 3. Tweak the HAVE_TRACE_STACK_FRAME_POINTERS definition. This enables native heap profiling in Release+Static builds. [1] Not perfectly, but enough to un-block related work. BUG=686208 Review-Url: https://codereview.chromium.org/2707223002 Cr-Commit-Position: refs/heads/master@{#456771} Committed: https://chromium.googlesource.com/chromium/src/+/93de86905a40d330fd5418a772b7a4ef83491215

Patch Set 1 #

Total comments: 2

Patch Set 2 : Cleanups #

Patch Set 3 : Fix memcpy() sizing error and disable unit-tests, which don't build #

Patch Set 4 : Add some TODOs #

Total comments: 4

Patch Set 5 : Review comments #

Total comments: 1

Patch Set 6 : Fix typos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -10 lines) Patch
M base/debug/stack_trace.h View 1 2 3 4 3 chunks +17 lines, -5 lines 0 comments Download
M base/debug/stack_trace.cc View 1 2 3 5 chunks +17 lines, -2 lines 0 comments Download
M base/debug/stack_trace_unittest.cc View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 35 (18 generated)
brettw
https://codereview.chromium.org/2707223002/diff/1/base/debug/stack_trace.h File base/debug/stack_trace.h (right): https://codereview.chromium.org/2707223002/diff/1/base/debug/stack_trace.h#newcode26 base/debug/stack_trace.h:26: //#if defined(OS_POSIX) && ( \ We should clean this ...
3 years, 10 months ago (2017-02-22 22:03:31 UTC) #4
Wez
https://codereview.chromium.org/2707223002/diff/1/base/debug/stack_trace.h File base/debug/stack_trace.h (right): https://codereview.chromium.org/2707223002/diff/1/base/debug/stack_trace.h#newcode26 base/debug/stack_trace.h:26: //#if defined(OS_POSIX) && ( \ On 2017/02/22 22:03:31, brettw ...
3 years, 10 months ago (2017-02-23 00:12:22 UTC) #5
Wez
awong: FYI; I'm an idiot who thinks pointers fit in a single byte. *ahem*.
3 years, 10 months ago (2017-02-24 00:44:18 UTC) #6
awong
LGTM
3 years, 9 months ago (2017-03-01 23:42:20 UTC) #7
awong
On 2017/03/01 23:42:20, awong wrote: > LGTM As a first pass for stack capture, this ...
3 years, 9 months ago (2017-03-01 23:43:26 UTC) #8
Wez
Would you prefer that we avoid setting "HAVE_STACK_FRAME_POINTERS" in builds other than Release+Static? Otherwise we'll ...
3 years, 9 months ago (2017-03-01 23:52:34 UTC) #9
awong
I actually think having it "work" for now makes sense. We should find a way ...
3 years, 9 months ago (2017-03-02 00:00:08 UTC) #10
Wez
OK, I'll fix that up this afternoon and go ahead and land. On 1 March ...
3 years, 9 months ago (2017-03-02 00:01:17 UTC) #11
Wez
dcheng: PTAL. This is a quick patch to un-block native heap profiling on Windows; we ...
3 years, 9 months ago (2017-03-13 01:35:14 UTC) #18
dcheng
https://codereview.chromium.org/2707223002/diff/60001/base/debug/stack_trace.h File base/debug/stack_trace.h (right): https://codereview.chromium.org/2707223002/diff/60001/base/debug/stack_trace.h#newcode29 base/debug/stack_trace.h:29: defined(OS_WIN) Nit: this condition is getting pretty hard to ...
3 years, 9 months ago (2017-03-13 02:11:21 UTC) #19
Wez
https://codereview.chromium.org/2707223002/diff/60001/base/debug/stack_trace.h File base/debug/stack_trace.h (right): https://codereview.chromium.org/2707223002/diff/60001/base/debug/stack_trace.h#newcode29 base/debug/stack_trace.h:29: defined(OS_WIN) On 2017/03/13 02:11:21, dcheng wrote: > Nit: this ...
3 years, 9 months ago (2017-03-14 05:22:39 UTC) #22
dcheng
LGTM https://codereview.chromium.org/2707223002/diff/80001/base/debug/stack_trace_unittest.cc File base/debug/stack_trace_unittest.cc (right): https://codereview.chromium.org/2707223002/diff/80001/base/debug/stack_trace_unittest.cc#newcode258 base/debug/stack_trace_unittest.cc:258: // Windows x64 binaries cannot be build with ...
3 years, 9 months ago (2017-03-14 07:22:42 UTC) #25
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/2707223002/100001
3 years, 9 months ago (2017-03-14 16:17:53 UTC) #28
Wez
+etienneb
3 years, 9 months ago (2017-03-14 18:11:32 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/93de86905a40d330fd5418a772b7a4ef83491215
3 years, 9 months ago (2017-03-14 18:45:02 UTC) #33
DmitrySkiba
On 2017/03/14 18:45:02, commit-bot: I haz the power wrote: > Committed patchset #6 (id:100001) as ...
3 years, 9 months ago (2017-03-14 19:36:13 UTC) #34
Wez
3 years, 9 months ago (2017-03-14 19:41:51 UTC) #35
Message was sent while issue was closed.
Yes, I agree; we weren't super happy about this either. I'll follow-up with
a cleanup, later this week.

On 14 March 2017 at 12:36, <dskiba@chromium.org> wrote:

> On 2017/03/14 18:45:02, commit-bot: I haz the power wrote:
> > Committed patchset #6 (id:100001) as
> >
> https://chromium.googlesource.com/chromium/src/+/
> 93de86905a40d330fd5418a772b7a4ef83491215
>
> TraceStackFramePointers() is supposed to use frame pointers for unwinding
> (hence
> the name). I don't think it's right to break that contract.
>
> The better way is to change AllocationContextTracker::GetContextSnapshot()
> to
> use StackTrace::Addresses when frame pointers are not available
> (HAVE_TRACE_STACK_FRAME_POINTERS is not defined).
>
> https://codereview.chromium.org/2707223002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698