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

Issue 9333003: Use FILE thread for disk operations in TraceSubscriberStdio (Closed)

Created:
8 years, 10 months ago by Iain Merrick
Modified:
8 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, nduca, kkania, brettw-cc_chromium.org, robertshield
Visibility:
Public.

Description

Use SequencedWorkerPool for disk operations in TraceSubscriberStdio. This class was hitting a ThreadRestrictions assert because it called OpenFile on the UI thread. To reduce unnecessary copying, I've changed the OnTraceDataCollected argument from std::string to RefCountedString. BUG=None TEST=content_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=123140

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Total comments: 17

Patch Set 3 : Addressed joth's comments #

Patch Set 4 : Fixed related code in chrome/ #

Patch Set 5 : Now using SequencedWorkerPool #

Total comments: 2

Patch Set 6 : Using __FILE__ for the sequence token #

Patch Set 7 : Use SequencedWorkerPool for disk operations in TraceSubscriberStdio. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -122 lines) Patch
M base/debug/trace_event_impl.h View 1 2 3 4 5 6 2 chunks +1 line, -4 lines 0 comments Download
M base/debug/trace_event_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M base/debug/trace_event_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M base/test/trace_event_analyzer_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/automation/automation_provider.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/automation/automation_provider.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/tracing_ui.cc View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/test/base/tracing.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/trace_controller.h View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M content/browser/trace_controller.cc View 1 2 3 4 5 6 4 chunks +3 lines, -7 lines 0 comments Download
M content/browser/trace_message_filter.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/trace_subscriber_stdio.h View 1 2 3 4 5 6 1 chunk +10 lines, -16 lines 0 comments Download
M content/browser/trace_subscriber_stdio.cc View 1 2 3 4 5 6 1 chunk +74 lines, -40 lines 0 comments Download
M content/browser/trace_subscriber_stdio_unittest.cc View 1 2 3 4 5 6 1 chunk +21 lines, -27 lines 0 comments Download
M content/common/child_trace_message_filter.h View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M content/common/child_trace_message_filter.cc View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Iain Merrick
8 years, 10 months ago (2012-02-06 17:23:35 UTC) #1
jam
http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc File content/browser/trace_subscriber_stdio.cc (right): http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc#newcode27 content/browser/trace_subscriber_stdio.cc:27: base::ThreadRestrictions::ScopedAllowIO scoped_allow_io; the goal is to eventually remove ThreadRestrictions. ...
8 years, 10 months ago (2012-02-06 20:25:28 UTC) #2
joth
http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc File content/browser/trace_subscriber_stdio.cc (right): http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc#newcode27 content/browser/trace_subscriber_stdio.cc:27: base::ThreadRestrictions::ScopedAllowIO scoped_allow_io; On 2012/02/06 20:25:29, John Abd-El-Malek wrote: > ...
8 years, 10 months ago (2012-02-07 09:14:59 UTC) #3
lain Merrick
TraceSubscriberStdio could potentially use a background thread, but that would involve copying the std::string argument ...
8 years, 10 months ago (2012-02-07 11:14:06 UTC) #4
Iain Merrick
This is now a much bigger change. I've noted a couple of places where I'm ...
8 years, 10 months ago (2012-02-08 12:07:05 UTC) #5
joth
> Joth, is there test coverage for startup tracing? If not, what manual tests > ...
8 years, 10 months ago (2012-02-08 13:22:20 UTC) #6
joth
On 2012/02/08 13:22:20, joth wrote: > On 2012/02/08 12:07:05, Iain Merrick wrote: > > This ...
8 years, 10 months ago (2012-02-08 13:26:01 UTC) #7
Iain Merrick
https://chromiumcodereview.appspot.com/9333003/diff/5001/content/browser/trace_message_filter.cc File content/browser/trace_message_filter.cc (right): https://chromiumcodereview.appspot.com/9333003/diff/5001/content/browser/trace_message_filter.cc#newcode99 content/browser/trace_message_filter.cc:99: scoped_refptr<base::RefCountedString> string(new base::RefCountedString()); On 2012/02/08 13:22:20, joth wrote: > ...
8 years, 10 months ago (2012-02-08 14:11:24 UTC) #8
joth
lg from my side, back to jam for his thought. copying in jbates & nduca ...
8 years, 10 months ago (2012-02-08 14:40:18 UTC) #9
Iain Merrick
On 2012/02/08 14:40:18, joth wrote: [...] > Actually that thread does indicate that FILE is ...
8 years, 10 months ago (2012-02-08 14:50:05 UTC) #10
Iain Merrick
FYI, using scoped_refptr<RefCountedString> in the IPC message itself looks feasible. Just a little extra template ...
8 years, 10 months ago (2012-02-08 15:50:12 UTC) #11
jbates
On 2012/02/08 15:50:12, Iain Merrick wrote: > FYI, using scoped_refptr<RefCountedString> in the IPC message itself ...
8 years, 10 months ago (2012-02-08 18:05:16 UTC) #12
Iain Merrick
On 2012/02/08 18:05:16, jbates wrote: > On 2012/02/08 15:50:12, Iain Merrick wrote: > > FYI, ...
8 years, 10 months ago (2012-02-08 18:15:27 UTC) #13
joth
https://chromiumcodereview.appspot.com/9333003/diff/10007/content/browser/trace_subscriber_stdio.cc File content/browser/trace_subscriber_stdio.cc (right): https://chromiumcodereview.appspot.com/9333003/diff/10007/content/browser/trace_subscriber_stdio.cc#newcode78 content/browser/trace_subscriber_stdio.cc:78: "TraceSubscriberStdio", FROM_HERE, Let's extract a constant for the token, ...
8 years, 10 months ago (2012-02-08 18:37:36 UTC) #14
Iain Merrick
https://chromiumcodereview.appspot.com/9333003/diff/10007/content/browser/trace_subscriber_stdio.cc File content/browser/trace_subscriber_stdio.cc (right): https://chromiumcodereview.appspot.com/9333003/diff/10007/content/browser/trace_subscriber_stdio.cc#newcode78 content/browser/trace_subscriber_stdio.cc:78: "TraceSubscriberStdio", FROM_HERE, On 2012/02/08 18:37:36, joth wrote: > Let's ...
8 years, 10 months ago (2012-02-08 18:57:06 UTC) #15
joth
On 8 February 2012 14:40, <joth@chromium.org> wrote: > lg from my side, back to jam ...
8 years, 10 months ago (2012-02-13 21:55:50 UTC) #16
Iain Merrick
John, do you have time to take another look at this? I think I've addressed ...
8 years, 10 months ago (2012-02-17 00:13:39 UTC) #17
jam
lgtm http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc File content/browser/trace_subscriber_stdio.cc (right): http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc#newcode27 content/browser/trace_subscriber_stdio.cc:27: base::ThreadRestrictions::ScopedAllowIO scoped_allow_io; On 2012/02/07 09:14:59, joth wrote: > ...
8 years, 10 months ago (2012-02-17 23:56:33 UTC) #18
Iain Merrick
http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc File content/browser/trace_subscriber_stdio.cc (right): http://codereview.chromium.org/9333003/diff/1/content/browser/trace_subscriber_stdio.cc#newcode27 content/browser/trace_subscriber_stdio.cc:27: base::ThreadRestrictions::ScopedAllowIO scoped_allow_io; On 2012/02/17 23:56:34, John Abd-El-Malek wrote: > ...
8 years, 10 months ago (2012-02-17 23:59:32 UTC) #19
Iain Merrick
+willchan for base/OWNERS +jcivelli for chrome/test/OWNERS Hi guys, do you have time to review this ...
8 years, 10 months ago (2012-02-18 00:14:37 UTC) #20
willchan no longer on Chromium
base/ changes LGTM
8 years, 10 months ago (2012-02-18 18:10:38 UTC) #21
Jay Civelli
LGTM for test changes
8 years, 10 months ago (2012-02-22 18:58:42 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/husky@chromium.org/9333003/12011
8 years, 10 months ago (2012-02-22 19:00:57 UTC) #23
commit-bot: I haz the power
Presubmit check for 9333003-12011 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 10 months ago (2012-02-22 19:01:05 UTC) #24
James Hawkins
lgtm
8 years, 10 months ago (2012-02-22 19:08:04 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/husky@chromium.org/9333003/12011
8 years, 10 months ago (2012-02-22 19:08:55 UTC) #26
commit-bot: I haz the power
Try job failure for 9333003-12011 (retry) on android for steps "build, Compile". It's a second ...
8 years, 10 months ago (2012-02-22 19:20:40 UTC) #27
Iain Merrick
Bitrot repaired, let's try again.
8 years, 10 months ago (2012-02-22 22:05:04 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/husky@chromium.org/9333003/22002
8 years, 10 months ago (2012-02-22 22:05:20 UTC) #29
commit-bot: I haz the power
8 years, 10 months ago (2012-02-22 23:53:03 UTC) #30
Change committed as 123140

Powered by Google App Engine
This is Rietveld 408576698