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

Issue 1430073002: [tracing] Allow asynchronous unregistration of unbound dump providers (Closed)

Created:
5 years, 1 month ago by Primiano Tucci (use gerrit)
Modified:
4 years, 11 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[tracing] Allow asynchronous unregistration of unbound dump providers Before this change, it was impossible to unregister unbound (i.e. no task runner affinity) dump providers. The reason is that unbound dump providers are invoked on a utility thread, which is transparent to the clients. Therefore the client cannot possibly guarantee that the unregistration will not race with the OnMemoryDump call. This CL solves the problem introducing a UnregisterAndDeleteSoonDumpProvider() method. The method takes ownership of the dump provider and guarantees that the dump provider will be deleted at some point in the near future (even immediately) and its deletion will be guaranteed to not overlap with the OnMemoryDump() call. BUG=461788 Committed: https://crrev.com/4c70669ee6f7bc1fccb61b21b89aa0c83d5c40a5 Cr-Commit-Position: refs/heads/master@{#367505}

Patch Set 1 #

Patch Set 2 : #

Total comments: 19

Patch Set 3 : new version #

Patch Set 4 : add test #

Patch Set 5 : fix doc #

Total comments: 25

Patch Set 6 : ruuda + ssid review #

Total comments: 3

Patch Set 7 : Rename method #

Total comments: 2

Patch Set 8 : avoid repeating messages #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -37 lines) Patch
M base/trace_event/memory_dump_manager.h View 1 2 3 4 5 6 4 chunks +18 lines, -2 lines 0 comments Download
M base/trace_event/memory_dump_manager.cc View 1 2 3 4 5 6 7 5 chunks +73 lines, -33 lines 0 comments Download
M base/trace_event/memory_dump_manager_unittest.cc View 1 2 3 4 5 6 4 chunks +78 lines, -1 line 0 comments Download
M base/trace_event/memory_dump_provider.h View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 26 (9 generated)
Primiano Tucci (use gerrit)
5 years ago (2015-12-14 14:03:25 UTC) #3
Ruud van Asseldonk
I feel that this is far more complex than it needs to be. The code ...
5 years ago (2015-12-14 16:25:49 UTC) #4
Primiano Tucci (use gerrit)
On 2015/12/14 16:25:49, Ruud van Asseldonk wrote: > I feel that this is far more ...
5 years ago (2015-12-14 17:47:13 UTC) #5
Primiano Tucci (use gerrit)
ssid@ can you take a second look. I went for the Unregister...Async version. ruuda@ I ...
4 years, 12 months ago (2015-12-22 13:46:55 UTC) #7
Primiano Tucci (use gerrit)
oh just realized this needs a fix in the condition below before landing. https://codereview.chromium.org/1430073002/diff/80001/base/trace_event/memory_dump_manager.cc File ...
4 years, 12 months ago (2015-12-22 15:04:46 UTC) #8
ssid
https://codereview.chromium.org/1430073002/diff/80001/base/trace_event/memory_dump_manager.cc File base/trace_event/memory_dump_manager.cc (right): https://codereview.chromium.org/1430073002/diff/80001/base/trace_event/memory_dump_manager.cc#newcode418 base/trace_event/memory_dump_manager.cc:418: LOG(ERROR) << "MemoryDumpProvider \"" << mdpinfo->name << "\" failed, ...
4 years, 12 months ago (2015-12-22 15:50:09 UTC) #9
ssid
one more nit. https://codereview.chromium.org/1430073002/diff/80001/base/trace_event/memory_dump_manager_unittest.cc File base/trace_event/memory_dump_manager_unittest.cc (right): https://codereview.chromium.org/1430073002/diff/80001/base/trace_event/memory_dump_manager_unittest.cc#newcode913 base/trace_event/memory_dump_manager_unittest.cc:913: // from another thread while dumping. ...
4 years, 12 months ago (2015-12-22 16:14:57 UTC) #10
Ruud van Asseldonk
On 2015/12/22 13:46:55, Primiano Tucci (OOO til Jan 4) wrote: > ssid@ can you take ...
4 years, 11 months ago (2015-12-29 11:32:46 UTC) #11
Primiano Tucci (use gerrit)
Thanks for the review. Took me a while to figure out the sense of this ...
4 years, 11 months ago (2016-01-04 14:44:38 UTC) #12
Ruud van Asseldonk
A few more nits: > This CL solves the solution introducing a There is a ...
4 years, 11 months ago (2016-01-04 15:43:01 UTC) #14
Primiano Tucci (use gerrit)
Done. Moved the rest (stricter DCHECK) to https://codereview.chromium.org/1559023002 https://codereview.chromium.org/1430073002/diff/100001/base/trace_event/memory_dump_manager.cc File base/trace_event/memory_dump_manager.cc (right): https://codereview.chromium.org/1430073002/diff/100001/base/trace_event/memory_dump_manager.cc#newcode252 base/trace_event/memory_dump_manager.cc:252: } ...
4 years, 11 months ago (2016-01-04 16:17:05 UTC) #16
ssid
lgtm with one concern and if ruuda@ is happy. https://codereview.chromium.org/1430073002/diff/120001/base/trace_event/memory_dump_manager.cc File base/trace_event/memory_dump_manager.cc (right): https://codereview.chromium.org/1430073002/diff/120001/base/trace_event/memory_dump_manager.cc#newcode429 base/trace_event/memory_dump_manager.cc:429: ...
4 years, 11 months ago (2016-01-04 16:39:34 UTC) #17
Ruud van Asseldonk
On 2016/01/04 16:39:34, ssid wrote: > lgtm with one concern and if ruuda@ is happy. ...
4 years, 11 months ago (2016-01-04 18:35:08 UTC) #18
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1430073002/diff/120001/base/trace_event/memory_dump_manager.cc File base/trace_event/memory_dump_manager.cc (right): https://codereview.chromium.org/1430073002/diff/120001/base/trace_event/memory_dump_manager.cc#newcode429 base/trace_event/memory_dump_manager.cc:429: LOG(ERROR) << "Disabling MemoryDumpProvider \"" << mdpinfo->name << "\". ...
4 years, 11 months ago (2016-01-04 18:42:20 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1430073002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1430073002/140001
4 years, 11 months ago (2016-01-05 10:35:45 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 11 months ago (2016-01-05 11:13:28 UTC) #24
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 11:14:19 UTC) #26
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/4c70669ee6f7bc1fccb61b21b89aa0c83d5c40a5
Cr-Commit-Position: refs/heads/master@{#367505}

Powered by Google App Engine
This is Rietveld 408576698