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

Issue 541763002: tracing: get rid of files in TracingController interface (Closed)

Created:
6 years, 3 months ago by caseq
Modified:
6 years, 3 months ago
CC:
aandrey+blink_chromium.org, chromium-reviews, darin-cc_chromium.org, devtools-reviews_chromium.org, dsinclair+watch_chromium.org, jam, paulirish+reviews_chromium.org, pfeldman, vsevik, wfh+watch_chromium.org, yurys
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

tracing: get rid of files in TracingController interface The only way to get the tracing data used to be by reading the file provided in TracingController::DisableTracing() interface. This does not fit well for most usages, so this introduces a TraceDataSink interface that is backed either by a file, string, or, in case of DevTools, by the protocol client. This resolves the OOM in browser and imporves performance while recording very large traces through DevTools, streamlines TracingController core and reduces coplexity of code for most TracingController clients. BUG=409733, 361045 Committed: https://crrev.com/b85bb8fc41a192f207fa2361a8edcfa42b47076f Cr-Commit-Position: refs/heads/master@{#294801}

Patch Set 1 #

Patch Set 2 : fixed android #

Total comments: 1

Patch Set 3 : switched TraceDataSink to RefCountedThreadSafe #

Patch Set 4 : fixed build following removal of cast opterator in scoped_refptr #

Total comments: 2

Patch Set 5 : more comments addressed #

Patch Set 6 : rebased, fixed tests following last ps #

Total comments: 2

Patch Set 7 : git cl format #

Patch Set 8 : rebased, fixed building notification message to work around limitations of StringPrintf #

Patch Set 9 : fixed test/base/tracing.cc #

Patch Set 10 : fixed system trace collection #

Unified diffs Side-by-side diffs Delta from patch set Stats (+350 lines, -409 lines) Patch
M chrome/test/base/tracing.cc View 1 2 3 4 5 6 7 8 3 chunks +30 lines, -37 lines 0 comments Download
M components/feedback/tracing_manager.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/feedback/tracing_manager.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -14 lines 0 comments Download
M content/browser/android/tracing_controller_android.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/tracing_controller_android.cc View 1 2 3 4 5 6 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/devtools/devtools_tracing_handler.h View 1 2 3 4 5 6 2 chunks +4 lines, -6 lines 0 comments Download
M content/browser/devtools/devtools_tracing_handler.cc View 1 2 3 4 5 6 7 5 chunks +37 lines, -77 lines 0 comments Download
M content/browser/tracing/tracing_controller_browsertest.cc View 1 2 3 4 5 6 8 chunks +64 lines, -21 lines 0 comments Download
M content/browser/tracing/tracing_controller_impl.h View 1 2 3 4 11 chunks +8 lines, -17 lines 0 comments Download
M content/browser/tracing/tracing_controller_impl.cc View 1 2 3 4 5 6 7 8 9 13 chunks +137 lines, -170 lines 0 comments Download
M content/browser/tracing/tracing_ui.cc View 1 2 3 4 5 5 chunks +7 lines, -35 lines 0 comments Download
M content/public/browser/tracing_controller.h View 1 2 3 4 5 6 4 chunks +40 lines, -19 lines 0 comments Download
M content/public/test/browser_test_base.cc View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 34 (8 generated)
caseq
As I previously proposed, this switches TracingController to expose a stream-like interface for trace events ...
6 years, 3 months ago (2014-09-04 14:22:45 UTC) #2
dsinclair
+wangxianzhu +haraken as they've done the most work on the file based trace controller.
6 years, 3 months ago (2014-09-04 17:48:46 UTC) #4
dsinclair
Overall I like the idea. Can you take a look at the sink ownership issue ...
6 years, 3 months ago (2014-09-04 18:03:13 UTC) #5
nduca
i'm good as long as dan lg's
6 years, 3 months ago (2014-09-04 18:27:40 UTC) #6
caseq
On 2014/09/04 18:03:13, dsinclair wrote: > Overall I like the idea. Can you take a ...
6 years, 3 months ago (2014-09-05 09:44:12 UTC) #7
dsinclair
On 2014/09/05 09:44:12, caseq wrote: > > Then, the tracing controller can free the object ...
6 years, 3 months ago (2014-09-05 13:58:29 UTC) #8
caseq
On 2014/09/05 13:58:29, dsinclair wrote: > It's a lot harder to reason about ownership in ...
6 years, 3 months ago (2014-09-05 15:13:03 UTC) #9
Xianzhu
I agree with caseq. I think scoped_refptr clearly states shared ownership and leaving the last ...
6 years, 3 months ago (2014-09-05 16:39:17 UTC) #10
dsinclair
Ok, fair enough, current system for ownership is good, just a couple of questions inline. ...
6 years, 3 months ago (2014-09-05 19:27:43 UTC) #11
caseq
On 2014/09/05 19:27:43, dsinclair wrote: > Ok, fair enough, current system for ownership is good, ...
6 years, 3 months ago (2014-09-08 09:16:09 UTC) #12
dsinclair
lgtm
6 years, 3 months ago (2014-09-08 13:35:33 UTC) #13
caseq
+jochen for content/ -- could you please take a look?
6 years, 3 months ago (2014-09-08 14:49:44 UTC) #15
yurys
lgtm
6 years, 3 months ago (2014-09-09 11:36:41 UTC) #16
nduca
lgtm
6 years, 3 months ago (2014-09-09 23:51:22 UTC) #17
caseq
jochen, ping ;)
6 years, 3 months ago (2014-09-10 07:27:35 UTC) #18
jochen (gone - plz use gerrit)
https://codereview.chromium.org/541763002/diff/90001/content/public/browser/tracing_controller.h File content/public/browser/tracing_controller.h (right): https://codereview.chromium.org/541763002/diff/90001/content/public/browser/tracing_controller.h#newcode37 content/public/browser/tracing_controller.h:37: : public base::RefCountedThreadSafe<TraceDataSink> { why threadsafe if all happens ...
6 years, 3 months ago (2014-09-10 07:33:56 UTC) #19
caseq
On 2014/09/10 07:33:56, jochen wrote: > https://codereview.chromium.org/541763002/diff/90001/content/public/browser/tracing_controller.h > File content/public/browser/tracing_controller.h (right): > > https://codereview.chromium.org/541763002/diff/90001/content/public/browser/tracing_controller.h#newcode37 > ...
6 years, 3 months ago (2014-09-10 07:53:52 UTC) #20
caseq
jochen, could you please take another look?
6 years, 3 months ago (2014-09-11 05:45:12 UTC) #21
jochen (gone - plz use gerrit)
lgtm
6 years, 3 months ago (2014-09-12 14:00:39 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/541763002/130001
6 years, 3 months ago (2014-09-15 08:04:21 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/55876) android_arm64_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/4480)
6 years, 3 months ago (2014-09-15 08:12:10 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/541763002/150001
6 years, 3 months ago (2014-09-15 09:06:32 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/60777)
6 years, 3 months ago (2014-09-15 09:20:53 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/541763002/170001
6 years, 3 months ago (2014-09-15 09:54:47 UTC) #32
commit-bot: I haz the power
Committed patchset #10 (id:170001) as b986b8073ff3c9499ce24957dba8c1e427f047ee
6 years, 3 months ago (2014-09-15 10:53:10 UTC) #33
commit-bot: I haz the power
6 years, 3 months ago (2014-09-15 10:55:20 UTC) #34
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/b85bb8fc41a192f207fa2361a8edcfa42b47076f
Cr-Commit-Position: refs/heads/master@{#294801}

Powered by Google App Engine
This is Rietveld 408576698