Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(16)

Issue 1044413002: Record async "task backtraces" (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years, 4 months ago by awong
Modified:
6 months, 1 week ago
Reviewers:
*danakj
CC:
chromium-reviews, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Record async "task backtraces" Places a small array in PendingTask that records the past 4 PostTasks that result in this task being run. In essence, it creates a backtrace of the asynchronous call stack resulting in this task being run. This array is copied onto the stack during execution so that it is available in crash dumps. BUG=690197 Review-Url: https://codereview.chromium.org/1044413002 Cr-Commit-Position: refs/heads/master@{#449471} Committed: https://chromium.googlesource.com/chromium/src/+/4f13f74b94d6f0a39b73a832217c5ccc2f02e60f

Patch Set 1 #

Total comments: 1

Patch Set 2 : reviving from the dead #

Patch Set 3 : moar 00 like. #

Total comments: 6

Patch Set 4 : Now with unittests! #

Total comments: 31

Patch Set 5 : Don't duplicate the posted_from in stacktrace. #

Total comments: 3

Patch Set 6 : Fix off-by-one. #

Patch Set 7 : STL ALL THE THINGS #

Total comments: 4

Patch Set 8 : c++11 is hard; let's go shopping. #

Total comments: 2

Patch Set 9 : Fix moar comments. #

Patch Set 10 : All ur base R useless to us. #

Patch Set 11 : All ur base R useless to us. #

Patch Set 12 : Actually use thread_b when I said I would. #

Total comments: 4

Patch Set 13 : Make the test data plus comments match up. #

Total comments: 2

Patch Set 14 : traces R hard. #

Total comments: 2

Patch Set 15 : More wording fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+220 lines, -18 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M base/debug/task_annotator.cc View 1 2 3 4 5 6 7 2 chunks +14 lines, -7 lines 0 comments Download
M base/message_loop/incoming_task_queue.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M base/message_loop/message_loop.h View 1 2 3 2 chunks +10 lines, -1 line 0 comments Download
M base/message_loop/message_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -1 line 0 comments Download
M base/pending_task.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M base/pending_task.cc View 1 2 3 4 5 6 7 2 chunks +15 lines, -7 lines 0 comments Download
A base/pending_task_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +169 lines, -0 lines 0 comments Download
Commit queue not available (can’t edit this change).

Messages

Total messages: 72 (36 generated)
awong
Crazy? Interesting?
2 years, 4 months ago (2015-03-31 22:40:50 UTC) #2
Ryan Sleevi
On 2015/03/31 22:40:50, awong (On leave) wrote: > Crazy? Interesting? Mentioned on IM, but crash ...
2 years, 4 months ago (2015-04-01 02:09:48 UTC) #3
danakj
On 2015/04/01 02:09:48, Ryan Sleevi wrote: > On 2015/03/31 22:40:50, awong (On leave) wrote: > ...
2 years, 4 months ago (2015-04-03 16:46:28 UTC) #4
awong
On 2015/04/03 16:46:28, danakj wrote: > On 2015/04/01 02:09:48, Ryan Sleevi wrote: > > On ...
2 years, 4 months ago (2015-04-03 16:52:46 UTC) #5
danakj
https://codereview.chromium.org/1044413002/diff/1/base/threading/worker_pool_posix.cc File base/threading/worker_pool_posix.cc (right): https://codereview.chromium.org/1044413002/diff/1/base/threading/worker_pool_posix.cc#newcode144 base/threading/worker_pool_posix.cc:144: MessageLoop::current()->current_pending_task_, The use of MessageLoop::current()->current_pending_task_ worries me. I think ...
2 years, 4 months ago (2015-04-03 17:18:35 UTC) #6
awong
On 2015/04/03 17:18:35, danakj (slow) wrote: > https://codereview.chromium.org/1044413002/diff/1/base/threading/worker_pool_posix.cc > File base/threading/worker_pool_posix.cc (right): > > https://codereview.chromium.org/1044413002/diff/1/base/threading/worker_pool_posix.cc#newcode144 ...
6 months, 1 week ago (2017-02-07 01:12:35 UTC) #16
danakj
So high level what about other ways to run tasks. https://cs.chromium.org/chromium/src/base/threading/sequenced_worker_pool.cc?rcl=36239a44ed2dfc0e88b0c7d1e1d51b502ce5d9a0&l=1021 https://cs.chromium.org/chromium/src/base/threading/worker_pool_posix.cc?rcl=36239a44ed2dfc0e88b0c7d1e1d51b502ce5d9a0&l=100 https://cs.chromium.org/chromium/src/base/task_scheduler/task_tracker.cc?rcl=36239a44ed2dfc0e88b0c7d1e1d51b502ce5d9a0&l=290 I'm likely ...
6 months, 1 week ago (2017-02-07 23:16:46 UTC) #18
awong
Added a unittest. Regarding how non-messageloop ways of running tests.. Urgh. I think the right ...
6 months, 1 week ago (2017-02-08 01:55:50 UTC) #19
awong
Regarding the threads w/o a MessageLoop that run Tasks, it looks like SequencedWorkerPool and WorkerPool ...
6 months, 1 week ago (2017-02-08 02:17:30 UTC) #22
danakj
On Tue, Feb 7, 2017 at 9:17 PM, <ajwong@chromium.org> wrote: > Regarding the threads w/o ...
6 months, 1 week ago (2017-02-08 16:54:11 UTC) #26
danakj
Since this is > 1 patch (and should anyway in case of followup issues) can ...
6 months, 1 week ago (2017-02-08 16:55:18 UTC) #27
danakj
On 2015/04/01 02:09:48, Ryan Sleevi wrote: > On 2015/03/31 22:40:50, awong (On leave) wrote: > ...
6 months, 1 week ago (2017-02-08 16:56:50 UTC) #28
Ryan Sleevi
On 2017/02/08 16:56:50, danakj (slow) wrote: > TBH I'm not sure what this means - ...
6 months, 1 week ago (2017-02-08 17:00:28 UTC) #29
danakj
On Wed, Feb 8, 2017 at 12:00 PM, <rsleevi@chromium.org> wrote: > On 2017/02/08 16:56:50, danakj ...
6 months, 1 week ago (2017-02-08 17:36:00 UTC) #30
danakj
https://codereview.chromium.org/1044413002/diff/80001/base/debug/task_annotator.cc File base/debug/task_annotator.cc (right): https://codereview.chromium.org/1044413002/diff/80001/base/debug/task_annotator.cc#newcode49 base/debug/task_annotator.cc:49: const void* task_backtrace[4]; can you static assert that this ...
6 months, 1 week ago (2017-02-08 18:06:23 UTC) #31
Ryan Sleevi
On 2017/02/08 17:36:00, danakj (slow) wrote: > This makes sense, thanks. Does crashpad make any ...
6 months, 1 week ago (2017-02-08 18:22:05 UTC) #32
awong
PTAL So, IIRC, breakpad (and I assume crashpad) snags the stack of the running threads. ...
6 months, 1 week ago (2017-02-08 23:19:46 UTC) #36
awong
https://codereview.chromium.org/1044413002/diff/80001/base/debug/task_annotator.cc File base/debug/task_annotator.cc (right): https://codereview.chromium.org/1044413002/diff/80001/base/debug/task_annotator.cc#newcode49 base/debug/task_annotator.cc:49: const void* task_backtrace[4]; On 2017/02/08 18:06:22, danakj (slow) wrote: ...
6 months, 1 week ago (2017-02-08 23:20:38 UTC) #39
danakj
Cool, there's a bunch of test comments that I assume you're looking thru, but the ...
6 months, 1 week ago (2017-02-08 23:39:20 UTC) #40
danakj
https://codereview.chromium.org/1044413002/diff/100001/base/debug/task_annotator.cc File base/debug/task_annotator.cc (right): https://codereview.chromium.org/1044413002/diff/100001/base/debug/task_annotator.cc#newcode52 base/debug/task_annotator.cc:52: sizeof(task_backtrace)); The compiler disagrees with me, you want size ...
6 months, 1 week ago (2017-02-08 23:40:28 UTC) #41
danakj
https://codereview.chromium.org/1044413002/diff/100001/base/debug/task_annotator.cc File base/debug/task_annotator.cc (right): https://codereview.chromium.org/1044413002/diff/100001/base/debug/task_annotator.cc#newcode52 base/debug/task_annotator.cc:52: sizeof(task_backtrace)); On 2017/02/08 23:40:28, danakj (slow) wrote: > The ...
6 months, 1 week ago (2017-02-08 23:41:04 UTC) #42
awong
https://codereview.chromium.org/1044413002/diff/100001/base/debug/task_annotator.cc File base/debug/task_annotator.cc (right): https://codereview.chromium.org/1044413002/diff/100001/base/debug/task_annotator.cc#newcode52 base/debug/task_annotator.cc:52: sizeof(task_backtrace)); On 2017/02/08 23:41:04, danakj (slow) wrote: > On ...
6 months, 1 week ago (2017-02-09 00:23:39 UTC) #46
danakj
What did you think of these comments? I think maybe they were missed? https://codereview.chromium.org/1044413002/diff/80001/base/pending_task_unittest.cc https://codereview.chromium.org/1044413002/diff/110001/base/debug/task_annotator.cc ...
6 months, 1 week ago (2017-02-09 16:39:51 UTC) #50
awong
https://codereview.chromium.org/1044413002/diff/110001/base/debug/task_annotator.cc File base/debug/task_annotator.cc (right): https://codereview.chromium.org/1044413002/diff/110001/base/debug/task_annotator.cc#newcode52 base/debug/task_annotator.cc:52: std::tuple_size<decltype(pending_task->task_backtrace)>::value + 1> On 2017/02/09 16:39:50, danakj (slow) wrote: ...
6 months, 1 week ago (2017-02-09 19:49:02 UTC) #51
danakj
https://codereview.chromium.org/1044413002/diff/130001/base/pending_task_unittest.cc File base/pending_task_unittest.cc (right): https://codereview.chromium.org/1044413002/diff/130001/base/pending_task_unittest.cc#newcode38 base/pending_task_unittest.cc:38: ->current_pending_task_->task_backtrace.size(), nit: this would probably wrap a lot nicer ...
6 months, 1 week ago (2017-02-09 20:34:43 UTC) #54
awong
https://codereview.chromium.org/1044413002/diff/80001/base/pending_task_unittest.cc File base/pending_task_unittest.cc (right): https://codereview.chromium.org/1044413002/diff/80001/base/pending_task_unittest.cc#newcode17 base/pending_task_unittest.cc:17: On 2017/02/08 18:06:23, danakj (slow) wrote: > can you ...
6 months, 1 week ago (2017-02-09 20:56:06 UTC) #55
danakj
https://codereview.chromium.org/1044413002/diff/80001/base/pending_task_unittest.cc File base/pending_task_unittest.cc (right): https://codereview.chromium.org/1044413002/diff/80001/base/pending_task_unittest.cc#newcode27 base/pending_task_unittest.cc:27: static void VerifyTraceAndPost(const scoped_refptr<TaskRunner>& task_runner, On 2017/02/09 20:56:05, awong ...
6 months, 1 week ago (2017-02-09 21:04:14 UTC) #58
awong
https://codereview.chromium.org/1044413002/diff/80001/base/pending_task_unittest.cc File base/pending_task_unittest.cc (right): https://codereview.chromium.org/1044413002/diff/80001/base/pending_task_unittest.cc#newcode27 base/pending_task_unittest.cc:27: static void VerifyTraceAndPost(const scoped_refptr<TaskRunner>& task_runner, On 2017/02/09 21:04:14, danakj ...
6 months, 1 week ago (2017-02-09 21:16:10 UTC) #59
danakj
Thanks! LGTM and I think the test is testing the code but it's a bit ...
6 months, 1 week ago (2017-02-09 21:16:27 UTC) #60
awong
https://codereview.chromium.org/1044413002/diff/210001/base/pending_task_unittest.cc File base/pending_task_unittest.cc (right): https://codereview.chromium.org/1044413002/diff/210001/base/pending_task_unittest.cc#newcode132 base/pending_task_unittest.cc:132: thread_c.message_loop()->task_runner(), location_b0, location_b1, On 2017/02/09 21:16:27, danakj (slow) wrote: ...
6 months, 1 week ago (2017-02-09 21:25:37 UTC) #62
danakj
https://codereview.chromium.org/1044413002/diff/120009/base/pending_task_unittest.cc File base/pending_task_unittest.cc (right): https://codereview.chromium.org/1044413002/diff/120009/base/pending_task_unittest.cc#newcode123 base/pending_task_unittest.cc:123: loop.task_runner(), location_c0, location_c1, This should be thread_c.task_runner() I think? ...
6 months, 1 week ago (2017-02-09 21:27:36 UTC) #63
awong
PTAL
6 months, 1 week ago (2017-02-09 21:31:47 UTC) #64
danakj
Hehe million back and forths. It LGTM. Last one just the comment https://codereview.chromium.org/1044413002/diff/240001/base/pending_task_unittest.cc File base/pending_task_unittest.cc ...
6 months, 1 week ago (2017-02-09 21:43:41 UTC) #65
awong
committing. https://codereview.chromium.org/1044413002/diff/240001/base/pending_task_unittest.cc File base/pending_task_unittest.cc (right): https://codereview.chromium.org/1044413002/diff/240001/base/pending_task_unittest.cc#newcode130 base/pending_task_unittest.cc:130: // Push one frame onto the stack in ...
6 months, 1 week ago (2017-02-09 21:53:42 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/1044413002/260001
6 months, 1 week ago (2017-02-09 21:54:21 UTC) #69
commit-bot: I haz the power
6 months, 1 week ago (2017-02-09 23:53:19 UTC) #72
Message was sent while issue was closed.
Committed patchset #15 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/4f13f74b94d6f0a39b73a832217c...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld b40b6558b