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

Issue 1879073002: Add function to trace stack using frame pointers. (Closed)

Created:
4 years, 8 months ago by Dmitry Skiba
Modified:
4 years, 8 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add function to trace stack using frame pointers. For memory-infra we need fast stack traces to implement allocation tracing (see https://goo.gl/DFoqfi). StackTrace class uses unwinding and is too slow. This change adds a function that uses frame pointers to walk the stack. The function supports x86, x64 and arm (but not thumb) architectures on POSIX platforms. BUG=602701 Committed: https://crrev.com/ead0969fe721b3a71a18abb9c1203c15e1276aa4 Cr-Commit-Position: refs/heads/master@{#389123}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Total comments: 15

Patch Set 3 : rebase #

Patch Set 4 : Add comments; fix tests #

Patch Set 5 : Revert buildfile changes #

Patch Set 6 : Force frame pointers in test functions #

Patch Set 7 : Support Android and ARM #

Patch Set 8 : Properly exclude Thumb; saner EXPECT_ macro to force frame pointers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -0 lines) Patch
M base/debug/stack_trace.h View 1 2 3 4 5 6 7 2 chunks +22 lines, -0 lines 0 comments Download
M base/debug/stack_trace.cc View 1 2 3 4 5 6 1 chunk +49 lines, -0 lines 0 comments Download
M base/debug/stack_trace_unittest.cc View 1 2 3 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 41 (8 generated)
Dmitry Skiba
4 years, 8 months ago (2016-04-12 18:33:17 UTC) #2
Nico
I think bcwhite has been also looking at manual stack walking (on windows iirc?) elsewhere, ...
4 years, 8 months ago (2016-04-12 18:43:19 UTC) #4
bcwhite
I'm afraid my stack knowledge is limited to looking through minidump files on Windows (with ...
4 years, 8 months ago (2016-04-13 12:36:24 UTC) #5
Dmitry Skiba
Guys, test that I added is failing on some bots - it's only tracing one ...
4 years, 8 months ago (2016-04-15 07:31:57 UTC) #6
Nico
Sorry, dropped the ball here. I have a general question: We don't really need 32-bit ...
4 years, 8 months ago (2016-04-15 20:00:00 UTC) #7
Nico
Also, do you have rough numbers for "too slow"?
4 years, 8 months ago (2016-04-15 20:00:19 UTC) #8
Nico
Frame pointers are omitted in release builds except when using profiling (https://code.google.com/p/chromium/codesearch#chromium/src/build/config/compiler/BUILD.gn&l=226).
4 years, 8 months ago (2016-04-15 20:01:46 UTC) #9
Dmitry Skiba
On 2016/04/15 20:01:46, Nico wrote: > Frame pointers are omitted in release builds except when ...
4 years, 8 months ago (2016-04-15 20:31:35 UTC) #10
Dmitry Skiba
So in case of native allocation tracing, we take stack trace for each allocation, and ...
4 years, 8 months ago (2016-04-15 20:31:43 UTC) #11
Dmitry Skiba
On 2016/04/15 20:31:43, Dmitry Skiba wrote: > So in case of native allocation tracing, we ...
4 years, 8 months ago (2016-04-18 18:04:26 UTC) #12
Nico
On 2016/04/15 20:31:35, Dmitry Skiba wrote: > On 2016/04/15 20:01:46, Nico wrote: > > Frame ...
4 years, 8 months ago (2016-04-18 19:42:05 UTC) #13
Primiano Tucci (use gerrit)
On 2016/04/18 18:04:26, Dmitry Skiba wrote: > On 2016/04/15 20:31:43, Dmitry Skiba wrote: > > ...
4 years, 8 months ago (2016-04-18 20:16:43 UTC) #14
Primiano Tucci (use gerrit)
Sorry I just realized I had draft comment on this but I never sent them. ...
4 years, 8 months ago (2016-04-18 20:18:08 UTC) #16
Dmitry Skiba
Guys, also please review build files changes - I needed to make sure that base_unittests ...
4 years, 8 months ago (2016-04-20 16:32:56 UTC) #17
Nico
hm, it'd be better if we didn't have to use special compiler flags for base_unittests. ...
4 years, 8 months ago (2016-04-20 17:11:32 UTC) #18
Dmitry Skiba
On 2016/04/20 17:11:32, Nico wrote: > hm, it'd be better if we didn't have to ...
4 years, 8 months ago (2016-04-20 17:19:28 UTC) #19
Nico
well, call frames are omitted when the compiler figures it's not needed. aren't they're always ...
4 years, 8 months ago (2016-04-20 17:23:49 UTC) #20
Primiano Tucci (use gerrit)
On 2016/04/20 17:19:28, Dmitry Skiba wrote: > On 2016/04/20 17:11:32, Nico wrote: > > hm, ...
4 years, 8 months ago (2016-04-20 17:27:22 UTC) #21
Dmitry Skiba
On 2016/04/20 17:23:49, Nico wrote: > well, call frames are omitted when the compiler figures ...
4 years, 8 months ago (2016-04-20 17:34:57 UTC) #22
Primiano Tucci (use gerrit)
On 2016/04/20 17:23:49, Nico wrote: > well, call frames are omitted when the compiler figures ...
4 years, 8 months ago (2016-04-20 17:41:15 UTC) #23
Primiano Tucci (use gerrit)
The stack_trace_posix.cc code looks good to me. The unittest seems very magical, I defer it ...
4 years, 8 months ago (2016-04-20 18:53:07 UTC) #24
Dmitry Skiba
On 2016/04/20 18:53:07, Primiano Tucci wrote: > The stack_trace_posix.cc code looks good to me. > ...
4 years, 8 months ago (2016-04-20 21:03:46 UTC) #25
Dmitry Skiba
Hurray, test passed on all builders! Nico, are you OK with &&label trick I used?
4 years, 8 months ago (2016-04-20 23:18:42 UTC) #26
Dmitry Skiba
Added support for arm. Had to move function to stack_trace.cc because on Android we don't ...
4 years, 8 months ago (2016-04-22 00:41:39 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1879073002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1879073002/140001
4 years, 8 months ago (2016-04-22 15:52:02 UTC) #31
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-04-22 15:56:23 UTC) #33
Nico
still lgtm, but i feel arm support could've been a separate cl. Primiano says that ...
4 years, 8 months ago (2016-04-22 16:04:58 UTC) #34
Dmitry Skiba
On 2016/04/22 16:04:58, Nico wrote: > still lgtm, but i feel arm support could've been ...
4 years, 8 months ago (2016-04-22 16:10:12 UTC) #35
Nico
I thought landing this was a bit aggressive too tbh. But in this case, it ...
4 years, 8 months ago (2016-04-22 16:11:13 UTC) #36
Primiano Tucci (use gerrit)
On 2016/04/22 16:10:12, Dmitry Skiba wrote: > > Primiano says that in practice most functions ...
4 years, 8 months ago (2016-04-22 16:15:53 UTC) #37
Dmitry Skiba
On 2016/04/22 16:15:53, Primiano Tucci wrote: > On 2016/04/22 16:10:12, Dmitry Skiba wrote: > > ...
4 years, 8 months ago (2016-04-22 16:18:32 UTC) #38
apacible
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/1907373002/ by apacible@chromium.org. ...
4 years, 8 months ago (2016-04-22 17:17:00 UTC) #39
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:48:08 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ead0969fe721b3a71a18abb9c1203c15e1276aa4
Cr-Commit-Position: refs/heads/master@{#389123}

Powered by Google App Engine
This is Rietveld 408576698