New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640235 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug


Sign in to add a comment

Make tracing a service [design doc: bit.ly/tracing-service]

Project Member Reported by sadrul@chromium.org, Aug 23 2016

Issue description

 issue 589950  fixed collecting the tracing data as console output. But this output isn't usable in a trace-viewer (e.g. chrome:tracing). It would be very useful to collect the tracing data in a way that we can load it in a trace-viewer. This would be a pre-requisite to running telemetry tests for mus/mustash.

 
Components: Internals>Tracing

Comment 3 by sky@chromium.org, Jan 9 2017

Labels: mustash-1
Summary: Make tracing a service (was: Collect tracing data we can view in trace-viewer)
Blockedon: 679830
Components: Speed>Tracing
Components: -Internals>Tracing
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/474d0213e93f623d92acb750fcdcd48c60a34c6c

commit 474d0213e93f623d92acb750fcdcd48c60a34c6c
Author: chiniforooshan <chiniforooshan@chromium.org>
Date: Thu Mar 09 18:30:29 2017

tracing: Introduce mojo Interfaces

Memory-infra IPCs were translated to mojo in a series of patches,
before. This CL introduces the mojo interface for all other parts,
except for background tracing, which will be dealt with in a separate
CL. For documentation of the interface, please refer to the comments
inside the mojom file.

BUG= 640235 

Review-Url: https://codereview.chromium.org/2723773002
Cr-Commit-Position: refs/heads/master@{#455800}

[modify] https://crrev.com/474d0213e93f623d92acb750fcdcd48c60a34c6c/services/resource_coordinator/public/interfaces/BUILD.gn
[add] https://crrev.com/474d0213e93f623d92acb750fcdcd48c60a34c6c/services/resource_coordinator/public/interfaces/tracing/OWNERS
[add] https://crrev.com/474d0213e93f623d92acb750fcdcd48c60a34c6c/services/resource_coordinator/public/interfaces/tracing/tracing.mojom

Comment 9 by sky@chromium.org, Mar 27 2017

Labels: mustash-2
Status: Started (was: Assigned)
Blocking: 709524

Comment 12 by jam@chromium.org, Apr 28 2017

Blocking: 598069
Project Member

Comment 13 by bugdroid1@chromium.org, May 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50510ac8fcc50e132c27edbb80d759cec829e47a

commit 50510ac8fcc50e132c27edbb80d759cec829e47a
Author: chiniforooshan <chiniforooshan@chromium.org>
Date: Tue May 02 16:58:35 2017

Delete the tracing service

This tracing service is not used by any one, AFAIK, and I am creating
a new tracing service that is going to replace the tracing controller
that currently exists in content/browser/tracing.

To get an idea of the new service, please take a look at the prototype:
https://codereview.chromium.org/2833873003/

BUG= 640235 

Review-Url: https://codereview.chromium.org/2852183002
Cr-Commit-Position: refs/heads/master@{#468684}

[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/ash/mus/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/ash/mus/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/ash/mus/window_manager_application.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/ash/mus/window_manager_application.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/chrome/app/mash/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/chrome/app/mash/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/chrome/app/mash/embedded_services.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/filesystem/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/filesystem/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/filesystem/file_system_app.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/filesystem/file_system_app.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/font_service/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/font_service/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/font_service/font_service_app.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/font_service/font_service_app.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/leveldb/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/leveldb/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/leveldb/leveldb_app.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/components/leveldb/leveldb_app.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/browser/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/browser/browser.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/browser/browser.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/catalog_viewer/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/catalog_viewer/catalog_viewer.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/catalog_viewer/catalog_viewer.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/example/views_examples/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/example/views_examples/views_examples.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/example/window_type_launcher/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/quick_launch/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/quick_launch/quick_launch.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/quick_launch/quick_launch.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/task_viewer/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/task_viewer/task_viewer.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/task_viewer/task_viewer.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/webtest/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/webtest/webtest.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/mash/webtest/webtest.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/file/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/file/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/service_manager/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/service_manager/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/service_manager/service_manager.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/service_manager/standalone/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/service_manager/standalone/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/service_manager/standalone/context.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/service_manager/standalone/context.h
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/service_manager/standalone/tracer.cc
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/service_manager/standalone/tracer.h
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/BUILD.gn
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/OWNERS
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/data_sink.cc
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/data_sink.h
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/main.cc
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/manifest.json
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/cpp/BUILD.gn
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/cpp/provider.cc
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/cpp/provider.h
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/cpp/switches.cc
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/cpp/switches.h
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/interfaces/BUILD.gn
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/interfaces/OWNERS
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/interfaces/constants.mojom
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/public/interfaces/tracing.mojom
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/recorder.cc
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/recorder.h
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/service.cc
[delete] https://crrev.com/31a45636e84fdf6cf56cac35ece3604baddf9174/services/tracing/service.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/ui/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/ui/DEPS
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/ui/clipboard/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/ui/ime/BUILD.gn
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/ui/service.cc
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/ui/service.h
[modify] https://crrev.com/50510ac8fcc50e132c27edbb80d759cec829e47a/services/ui/ws/BUILD.gn

Project Member

Comment 14 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b3cad27b421b2aa9f6b0a89c80238480ba14023e

commit b3cad27b421b2aa9f6b0a89c80238480ba14023e
Author: chiniforooshan <chiniforooshan@chromium.org>
Date: Fri May 19 00:20:23 2017

tracing: The client lib of the tracing service

Any process that needs to connect to the tracing service and provide
trace events can just call TraceEventAgent::GetOrCreateInstance and
pass a connection to an implementation of the AgentSet interface.

A somewhat working prototype that includes the service
implementation:
https://codereview.chromium.org/2833873003/

Design doc (use @chromium.org account):
https://docs.google.com/document/d/1osLqctK_rTiioKFOG9wDLkrCQ9DLJZmm4j-S335u-vM

BUG= 640235 

Review-Url: https://codereview.chromium.org/2878533003
Cr-Commit-Position: refs/heads/master@{#472989}

[modify] https://crrev.com/b3cad27b421b2aa9f6b0a89c80238480ba14023e/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/b3cad27b421b2aa9f6b0a89c80238480ba14023e/services/resource_coordinator/public/cpp/BUILD.gn
[add] https://crrev.com/b3cad27b421b2aa9f6b0a89c80238480ba14023e/services/resource_coordinator/public/cpp/tracing/OWNERS
[add] https://crrev.com/b3cad27b421b2aa9f6b0a89c80238480ba14023e/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[add] https://crrev.com/b3cad27b421b2aa9f6b0a89c80238480ba14023e/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[add] https://crrev.com/b3cad27b421b2aa9f6b0a89c80238480ba14023e/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/b3cad27b421b2aa9f6b0a89c80238480ba14023e/services/resource_coordinator/public/interfaces/tracing/tracing.mojom

Project Member

Comment 15 by bugdroid1@chromium.org, May 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e2b178d99399c687bc60adea7e6b2460c9cfca6

commit 2e2b178d99399c687bc60adea7e6b2460c9cfca6
Author: chiniforooshan <chiniforooshan@chromium.org>
Date: Fri May 26 02:42:58 2017

tracing: the recorder implementation

Recorders are created by the tracing::Coordinator and sent to the
agents at StartTracing. Agents should flush their trace events to
the recorder when then receive the StopTracing message.

A prototype of the final product (a little bit stale and incomplete):
https://codereview.chromium.org/2833873003/

Design doc (use @chromium.org account):
https://docs.google.com/document/d/1osLqctK_rTiioKFOG9wDLkrCQ9DLJZmm4j-S335u-vM

BUG= 640235 

Review-Url: https://codereview.chromium.org/2886203002
Cr-Commit-Position: refs/heads/master@{#474886}

[modify] https://crrev.com/2e2b178d99399c687bc60adea7e6b2460c9cfca6/services/resource_coordinator/BUILD.gn
[add] https://crrev.com/2e2b178d99399c687bc60adea7e6b2460c9cfca6/services/resource_coordinator/tracing/BUILD.gn
[add] https://crrev.com/2e2b178d99399c687bc60adea7e6b2460c9cfca6/services/resource_coordinator/tracing/OWNER
[add] https://crrev.com/2e2b178d99399c687bc60adea7e6b2460c9cfca6/services/resource_coordinator/tracing/recorder.cc
[add] https://crrev.com/2e2b178d99399c687bc60adea7e6b2460c9cfca6/services/resource_coordinator/tracing/recorder.h
[add] https://crrev.com/2e2b178d99399c687bc60adea7e6b2460c9cfca6/services/resource_coordinator/tracing/recorder_unittest.cc

Comment 17 by sky@chromium.org, Jun 8 2017

Blocking: 731255
Project Member

Comment 18 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a1994e59ac2392b52352d6a73a1c43028cd5a02

commit 3a1994e59ac2392b52352d6a73a1c43028cd5a02
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Thu Jun 15 16:05:06 2017

tracing: the coordinator implementation

The coordinator is the main part of the tracing service. It provides
an API for trace collection to be used by the tracing UI, devtools,
etc. It coordinates tracing agents through the agent registry.

A prototype of the final product (a little bit stale and incomplete):
https://codereview.chromium.org/2833873003/

Issuing clock sync markers is not implemented in this CL. I think it
deserves to be sent and reviewed in a separate CL.

Design doc (use @chromium.org account):
https://docs.google.com/document/d/1osLqctK_rTiioKFOG9wDLkrCQ9DLJZmm4j-S335u-vM

BUG= 640235 

Change-Id: I02e0ab5840167331346f5de725afa20ae75cd77f
Reviewed-on: https://chromium-review.googlesource.com/524183
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Oystein Eftevaag <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479723}
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/public/interfaces/BUILD.gn
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
[add] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/public/interfaces/tracing/tracing_constants.mojom
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/BUILD.gn
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/agent_registry.cc
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/agent_registry.h
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/agent_registry_unittest.cc
[add] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/coordinator.cc
[add] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/coordinator.h
[add] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/coordinator_unittest.cc
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/recorder.cc
[modify] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/recorder.h
[add] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/test_util.cc
[add] https://crrev.com/3a1994e59ac2392b52352d6a73a1c43028cd5a02/services/resource_coordinator/tracing/test_util.h

Project Member

Comment 19 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a09fc88fe135ccfd5dc13d07788f263986186f27

commit a09fc88fe135ccfd5dc13d07788f263986186f27
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Thu Jun 15 17:49:22 2017

tracing: cleaning up trace message filter observing

TraceMessageFilterObservers are only used by background tracing. This CL moves
the relevant part from TracingControllerImpl to BackgroundTracingManagerImpl,
which is a more logical place for it.

Also, this is in preparation for eventually replacing the tracing controller
with tracing::Coordinator. We move out background tracing and chrome agent
implementation from the controller and then we can completely replace the
remaining code, which is for coordinating messages to/from trace clients, with
tracing::Coordinator.

This should be a no-op except for one thing: in the old code,
OnTraceMessageFilterAdded will be called on registered observers whenever we add
a new TraceMessageFilter, but OnTraceMessageFilterRemoved is NOT called when a
filter is removed (lines 436-480). This looked like a bug and is fixed here.

BUG= 640235 

Change-Id: Id7fb76889caa0907c69b468f5fa1123116fc5346
Reviewed-on: https://chromium-review.googlesource.com/529464
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: siddhartha sivakumar <ssid@chromium.org>
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479752}
[modify] https://crrev.com/a09fc88fe135ccfd5dc13d07788f263986186f27/content/browser/tracing/background_tracing_manager_impl.cc
[modify] https://crrev.com/a09fc88fe135ccfd5dc13d07788f263986186f27/content/browser/tracing/background_tracing_manager_impl.h
[modify] https://crrev.com/a09fc88fe135ccfd5dc13d07788f263986186f27/content/browser/tracing/background_tracing_rule.cc
[modify] https://crrev.com/a09fc88fe135ccfd5dc13d07788f263986186f27/content/browser/tracing/trace_message_filter.cc
[modify] https://crrev.com/a09fc88fe135ccfd5dc13d07788f263986186f27/content/browser/tracing/trace_message_filter.h
[modify] https://crrev.com/a09fc88fe135ccfd5dc13d07788f263986186f27/content/browser/tracing/tracing_controller_impl.cc
[modify] https://crrev.com/a09fc88fe135ccfd5dc13d07788f263986186f27/content/browser/tracing/tracing_controller_impl.h

Project Member

Comment 20 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0

commit 3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0
Author: Scott Graham <scottmg@chromium.org>
Date: Fri Jun 16 00:54:19 2017

Revert "tracing: the coordinator implementation"

This reverts commit 3a1994e59ac2392b52352d6a73a1c43028cd5a02.

Reason for revert: Suspected for services_unittests failures starting here https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20(1).

https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%281%29/builds/68107

Original change's description:
> tracing: the coordinator implementation
> 
> The coordinator is the main part of the tracing service. It provides
> an API for trace collection to be used by the tracing UI, devtools,
> etc. It coordinates tracing agents through the agent registry.
> 
> A prototype of the final product (a little bit stale and incomplete):
> https://codereview.chromium.org/2833873003/
> 
> Issuing clock sync markers is not implemented in this CL. I think it
> deserves to be sent and reviewed in a separate CL.
> 
> Design doc (use @chromium.org account):
> https://docs.google.com/document/d/1osLqctK_rTiioKFOG9wDLkrCQ9DLJZmm4j-S335u-vM
> 
> BUG= 640235 
> 
> Change-Id: I02e0ab5840167331346f5de725afa20ae75cd77f
> Reviewed-on: https://chromium-review.googlesource.com/524183
> Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
> Reviewed-by: Ken Buchanan <kenrb@chromium.org>
> Reviewed-by: Oystein Eftevaag <oysteine@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#479723}

TBR=kenrb@chromium.org,chiniforooshan@chromium.org,oysteine@chromium.org

Change-Id: I2cbea73f6185d810e10d1831ffe3d9ea95e10ca1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  640235 
Reviewed-on: https://chromium-review.googlesource.com/538139
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479885}
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/public/interfaces/BUILD.gn
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
[delete] https://crrev.com/c3ca45de4a48daca6daa966af06119400f1f8eae/services/resource_coordinator/public/interfaces/tracing/tracing_constants.mojom
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/tracing/BUILD.gn
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/tracing/agent_registry.cc
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/tracing/agent_registry.h
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/tracing/agent_registry_unittest.cc
[delete] https://crrev.com/c3ca45de4a48daca6daa966af06119400f1f8eae/services/resource_coordinator/tracing/coordinator.cc
[delete] https://crrev.com/c3ca45de4a48daca6daa966af06119400f1f8eae/services/resource_coordinator/tracing/coordinator.h
[delete] https://crrev.com/c3ca45de4a48daca6daa966af06119400f1f8eae/services/resource_coordinator/tracing/coordinator_unittest.cc
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/tracing/recorder.cc
[modify] https://crrev.com/3a8e71c423d8abc5cbaf5ac6afcf72fd1a6993a0/services/resource_coordinator/tracing/recorder.h
[delete] https://crrev.com/c3ca45de4a48daca6daa966af06119400f1f8eae/services/resource_coordinator/tracing/test_util.cc
[delete] https://crrev.com/c3ca45de4a48daca6daa966af06119400f1f8eae/services/resource_coordinator/tracing/test_util.h

Summary: Make tracing a service [design doc: bit.ly/tracing-service] (was: Make tracing a service)
Blocking: 734561
Project Member

Comment 23 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/425a4c83df470ab67739d7766f2bf09c7fe9b58c

commit 425a4c83df470ab67739d7766f2bf09c7fe9b58c
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Thu Jul 06 17:35:51 2017

tracing: reland the coordinator implementation

The original CL (crrev.com/3a1994e) was reverted in crrev.com/3a8e71c,
because the tests were failing on Win7:

https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%281%29/builds/68107

I could not reproduce the failure on a Win7 machine. I have some
speculative fixes here and a little bit more logging so that if the
tests fail again, maybe I have a little bit more information.

Summary of changes:
- The tracing service clears the callback before running it. This way,
  the callback can call service methods successfully. Before, we would
  clear the callback after the callback was finished and so we could
  not call service methods during the callback because the service
  would think the previous call is not finalized yet.

- StopAndFlush* tests check if flushing is already done before running
  the RunLoop. This is for the hypothetical case that mojo calls do
  not generate tasks and everything is running directly. Then, by the
  time StopAndFlush is finished the events are already flushed and the
  task queue is empty. So, running the RunLoop will time out.

- RequestBufferUsage verifies that all disconnect closures are indeed
  cleared up after the RunLoop quits. I added this so that if the test
  fails again at least I know whether RequestBufferUsage was actually
  finalized or there is a pending disconnect closure for some reason.

Original CL description:

The coordinator is the main part of the tracing service. It provides
an API for trace collection to be used by the tracing UI, devtools,
etc. It coordinates tracing agents through the agent registry.

A prototype of the final product (a little bit stale and incomplete):
https://codereview.chromium.org/2833873003/

Issuing clock sync markers is not implemented in this CL. I think it
deserves to be sent and reviewed in a separate CL.

Design doc (use @chromium.org account):
https://docs.google.com/document/d/1osLqctK_rTiioKFOG9wDLkrCQ9DLJZmm4j-S335u-vM

BUG= 640235 

Change-Id: I5904946171851da0a90313c3a8164134fb275c01
Reviewed-on: https://chromium-review.googlesource.com/541556
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484653}
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/public/interfaces/BUILD.gn
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
[add] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/public/interfaces/tracing/tracing_constants.mojom
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/BUILD.gn
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/agent_registry.cc
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/agent_registry.h
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/agent_registry_unittest.cc
[add] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/coordinator.cc
[add] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/coordinator.h
[add] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/coordinator_unittest.cc
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/recorder.cc
[modify] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/recorder.h
[add] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/test_util.cc
[add] https://crrev.com/425a4c83df470ab67739d7766f2bf09c7fe9b58c/services/resource_coordinator/tracing/test_util.h

Project Member

Comment 24 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4283cc3bce25ab5b641b338ada726713e25cfba8

commit 4283cc3bce25ab5b641b338ada726713e25cfba8
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Thu Jul 06 18:27:22 2017

Revert "tracing: reland the coordinator implementation"

This reverts commit 425a4c83df470ab67739d7766f2bf09c7fe9b58c.

Reason for revert:

Suspecting this change in breakage of CoordinatorTest.StopAndFlushWithMetadata and other CoordinatorTest tests on Mac10.10 and Mac10.9.

See: https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/20469

Original change's description:
> tracing: reland the coordinator implementation
> 
> The original CL (crrev.com/3a1994e) was reverted in crrev.com/3a8e71c,
> because the tests were failing on Win7:
> 
> https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%281%29/builds/68107
> 
> I could not reproduce the failure on a Win7 machine. I have some
> speculative fixes here and a little bit more logging so that if the
> tests fail again, maybe I have a little bit more information.
> 
> Summary of changes:
> - The tracing service clears the callback before running it. This way,
>   the callback can call service methods successfully. Before, we would
>   clear the callback after the callback was finished and so we could
>   not call service methods during the callback because the service
>   would think the previous call is not finalized yet.
> 
> - StopAndFlush* tests check if flushing is already done before running
>   the RunLoop. This is for the hypothetical case that mojo calls do
>   not generate tasks and everything is running directly. Then, by the
>   time StopAndFlush is finished the events are already flushed and the
>   task queue is empty. So, running the RunLoop will time out.
> 
> - RequestBufferUsage verifies that all disconnect closures are indeed
>   cleared up after the RunLoop quits. I added this so that if the test
>   fails again at least I know whether RequestBufferUsage was actually
>   finalized or there is a pending disconnect closure for some reason.
> 
> Original CL description:
> 
> The coordinator is the main part of the tracing service. It provides
> an API for trace collection to be used by the tracing UI, devtools,
> etc. It coordinates tracing agents through the agent registry.
> 
> A prototype of the final product (a little bit stale and incomplete):
> https://codereview.chromium.org/2833873003/
> 
> Issuing clock sync markers is not implemented in this CL. I think it
> deserves to be sent and reviewed in a separate CL.
> 
> Design doc (use @chromium.org account):
> https://docs.google.com/document/d/1osLqctK_rTiioKFOG9wDLkrCQ9DLJZmm4j-S335u-vM
> 
> BUG= 640235 
> 
> Change-Id: I5904946171851da0a90313c3a8164134fb275c01
> Reviewed-on: https://chromium-review.googlesource.com/541556
> Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
> Reviewed-by: Ken Buchanan <kenrb@chromium.org>
> Reviewed-by: Primiano Tucci <primiano@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#484653}

TBR=kenrb@chromium.org,primiano@chromium.org,chiniforooshan@chromium.org

Change-Id: Ife94dc4d4d4d15ce2fc4a2fdc42efb2cc882913a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  640235 
Reviewed-on: https://chromium-review.googlesource.com/562396
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484681}
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/public/interfaces/BUILD.gn
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
[delete] https://crrev.com/fa149ae6d514f630dd7d4dd7be75e4bf85f5ea36/services/resource_coordinator/public/interfaces/tracing/tracing_constants.mojom
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/tracing/BUILD.gn
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/tracing/agent_registry.cc
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/tracing/agent_registry.h
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/tracing/agent_registry_unittest.cc
[delete] https://crrev.com/fa149ae6d514f630dd7d4dd7be75e4bf85f5ea36/services/resource_coordinator/tracing/coordinator.cc
[delete] https://crrev.com/fa149ae6d514f630dd7d4dd7be75e4bf85f5ea36/services/resource_coordinator/tracing/coordinator.h
[delete] https://crrev.com/fa149ae6d514f630dd7d4dd7be75e4bf85f5ea36/services/resource_coordinator/tracing/coordinator_unittest.cc
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/tracing/recorder.cc
[modify] https://crrev.com/4283cc3bce25ab5b641b338ada726713e25cfba8/services/resource_coordinator/tracing/recorder.h
[delete] https://crrev.com/fa149ae6d514f630dd7d4dd7be75e4bf85f5ea36/services/resource_coordinator/tracing/test_util.cc
[delete] https://crrev.com/fa149ae6d514f630dd7d4dd7be75e4bf85f5ea36/services/resource_coordinator/tracing/test_util.h

Project Member

Comment 25 by bugdroid1@chromium.org, Jul 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62181031efadb7bceb3864b42efc789bed7cccf5

commit 62181031efadb7bceb3864b42efc789bed7cccf5
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Fri Jul 07 19:21:19 2017

tracing: re-land the coordinator implementation (3rd attempt)

- The original CL (crrev.com/3a1994e) was reverted in crrev.com/3a8e71c.

- The reland (crrev.com/425a4c8) did not fix the failures and was reverted
  again in crrev.com/4283cc.

- It turned out that the real issue was that some work was done inside a DCHECK,
  which is ignored when DCHECK is off. (Wondering why we do not have at least
  one CQ bot with DCHECK off when that's the default in release builds?)

- Patch set 1 is the reverted CL and patch set 2 is the fixed version.

BUG= 640235 

Change-Id: I6c4c3fa3854f433df9c93f4c2e5215224ad3347d
Reviewed-on: https://chromium-review.googlesource.com/562676
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485005}
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/public/interfaces/BUILD.gn
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
[add] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/public/interfaces/tracing/tracing_constants.mojom
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/BUILD.gn
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/agent_registry.cc
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/agent_registry.h
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/agent_registry_unittest.cc
[add] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/coordinator.cc
[add] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/coordinator.h
[add] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/coordinator_unittest.cc
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/recorder.cc
[modify] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/recorder.h
[add] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/test_util.cc
[add] https://crrev.com/62181031efadb7bceb3864b42efc789bed7cccf5/services/resource_coordinator/tracing/test_util.h

Project Member

Comment 26 by bugdroid1@chromium.org, Aug 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/63e20027b443b7cece570c4c14b04c332ba9c084

commit 63e20027b443b7cece570c4c14b04c332ba9c084
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Mon Aug 14 18:05:11 2017

Make TracingHandler able to process partial data

The TracingHandler assumes that it receives valid JSON chunks from the
tracing controller. This happens to be OK today but will not be
guaranteed after the servicification of tracing, since trace data will
be read from a mojo data pipe that may be chunked in an arbitrary way
depending on the buffer size.

This CL changes the TracingHandler so that it can handle arbitrary
chunking in preparation for the upcoming tracing changes.

Tracing servicification:
https://chromium-review.googlesource.com/c/575716

BUG= 640235 

Change-Id: I96e5a4dd4f37ea4da31c74f0e687fa220f7c8e51
Reviewed-on: https://chromium-review.googlesource.com/606992
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494097}
[modify] https://crrev.com/63e20027b443b7cece570c4c14b04c332ba9c084/content/browser/devtools/protocol/tracing_handler.cc
[modify] https://crrev.com/63e20027b443b7cece570c4c14b04c332ba9c084/content/browser/devtools/protocol/tracing_handler.h
[modify] https://crrev.com/63e20027b443b7cece570c4c14b04c332ba9c084/content/browser/devtools/protocol/tracing_handler_unittest.cc

Project Member

Comment 27 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dcd390cfc12c6bcbac0bb46723de5cbab2730915

commit dcd390cfc12c6bcbac0bb46723de5cbab2730915
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Wed Aug 16 19:58:28 2017

tracing: mojom changes and clock sync marker impl

- The coordinator requests clock sync markers before stopping tracing
  from all agents that support it.

- The coordinator returns the metadata separately, to be used in crash
  service uploader.

- StopAndFlush now supports flusing a specific agent only. DevTools,
  for example, just cares about chrome trace events and not other
  agents. So it can request to receive events only from agents that
  produce chrome trace events.

- A bug in AgentRegistry is fixed where we could invalidate an
  iterator inside a loop.

BUG= 640235 

Change-Id: I4a8ba3662a72cafc11b4ef81938e74d094b4c94c
Reviewed-on: https://chromium-review.googlesource.com/610420
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Reviewed-by: Oystein Eftevaag <oysteine@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494909}
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/tracing/agent_registry.cc
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/tracing/agent_registry.h
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/tracing/coordinator.cc
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/tracing/coordinator.h
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/tracing/coordinator_unittest.cc
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/tracing/test_util.cc
[modify] https://crrev.com/dcd390cfc12c6bcbac0bb46723de5cbab2730915/services/resource_coordinator/tracing/test_util.h

Blocking: 686865
Blocking: 759163
Project Member

Comment 30 by bugdroid1@chromium.org, Sep 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60345b63eb89379e689347ff01d7c8b52cfaa18a

commit 60345b63eb89379e689347ff01d7c8b52cfaa18a
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Wed Sep 13 17:10:15 2017

move memory_infra and tracing to the GRC service

memory_instrumentation::Coordinator is exposed by the browser service
right now, which was a temporary solution before the
resource_coordinator service was created. This CL moves it to the
resource_coordinator service.

Also, this CL exposes the tracing service, too. Later it will be used
instead of the tracing controller that lives in the browser.

Moving memory instrumentation and tracing to the resource_coordinator
service will let the service manager to register all "service"
processes to report memory usage and trace data. This is not possible
if memory instrumentation and tracing live in content_browser since it
will be a layering violation to have a dependency from
//services/service_manager to content.

BUG= 687020 , 640235 , 733165 

Change-Id: I7ea9e61430f4406fd115abd747b35a806a392469
Reviewed-on: https://chromium-review.googlesource.com/628658
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501668}
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/chrome/browser/metrics/process_memory_metrics_emitter.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/content/browser/browser_main_loop.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/content/browser/browser_main_loop.h
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/content/browser/service_manager/common_browser_interfaces.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/content/child/child_thread_impl.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/content/public/app/mojo/content_packaged_services_manifest.json
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/content/public/app/mojo/content_renderer_manifest.json
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/coordination_unit_introspector_impl.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/coordination_unit_introspector_impl.h
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/coordination_unit_manager.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/coordination_unit_manager.h
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.h
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/tab_signal_generator_impl.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/coordination_unit/tab_signal_generator_impl.h
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/manifest.json
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/resource_coordinator_service.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/resource_coordinator_service.h
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/service_callbacks_impl.cc
[modify] https://crrev.com/60345b63eb89379e689347ff01d7c8b52cfaa18a/services/resource_coordinator/service_callbacks_impl.h

Project Member

Comment 31 by bugdroid1@chromium.org, Sep 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3148a21a852e1d31345793a43fbf77430a96e3e1

commit 3148a21a852e1d31345793a43fbf77430a96e3e1
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Thu Sep 14 01:43:12 2017

Fix a bug in TracingHandler

The bug is in UpdateTraceDataBuffer, introduced in crrev/c/606992: if
the new trace chunk starts with a comma and the buffer is empty, then
the returned string will start with a comma which makes it a non-valid
JSON chunk. The bug slipped in when we tried to optimize by avoiding a
copy and truncating in place instead.

A new test for this corner case is added.

BUG= 640235 

Change-Id: I3e2fb2fd6b8008119c6808bdcff05e710f263ca4
Reviewed-on: https://chromium-review.googlesource.com/656201
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501835}
[modify] https://crrev.com/3148a21a852e1d31345793a43fbf77430a96e3e1/content/browser/devtools/protocol/tracing_handler.cc
[modify] https://crrev.com/3148a21a852e1d31345793a43fbf77430a96e3e1/content/browser/devtools/protocol/tracing_handler.h
[modify] https://crrev.com/3148a21a852e1d31345793a43fbf77430a96e3e1/content/browser/devtools/protocol/tracing_handler_unittest.cc

Project Member

Comment 32 by bugdroid1@chromium.org, Oct 3 2017

Project Member

Comment 33 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c77b44ebb53886e039c8471548c2050cceceda59

commit c77b44ebb53886e039c8471548c2050cceceda59
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Tue Oct 10 18:12:10 2017

tracing: TracingController -> Coordinator

This CL re-plumbs the content code to use the tracing::Coordinator
interface instead of content::TracingControllerImpl.

Summary of modifications:

1- Existing tracing agents extend base::trace_event::TracingAgent. We
   modified them to extend tracing::Agent, instead.

2- content::TracingControllerImpl is modified to forward all calls to
   tracing::Coordinator via Mojo.

3- Chrome tracing IPC messages between child processes and
   content::TracingControllerImpl are deleted.

4- Now that tracing agents (battor/etw/cros/arc) and chrome trace
   trace event clients are unified, there is no need for
   TracingController::TraceDataSink. It is deleted.
   TracingController::TraceDataEndpoint is used directly.

Bug= 640235 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I6dab520a2b53b0a56a016fccf9052e76fc99f78f
Reviewed-on: https://chromium-review.googlesource.com/575716
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507717}
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/android_webview/browser/tracing/aw_tracing_delegate.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/android_webview/browser/tracing/aw_tracing_delegate.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/chrome/browser/chrome_browser_field_trials.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/chrome/browser/tracing/chrome_tracing_delegate.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/chrome/browser/tracing/chrome_tracing_delegate.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/chrome/test/base/tracing.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/components/feedback/tracing_manager.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/components/tracing/child/child_trace_message_filter.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/components/tracing/child/child_trace_message_filter.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/components/tracing/common/tracing_messages.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/BUILD.gn
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/android/tracing_controller_android.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/browser_main_loop.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/browser_main_loop.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/devtools/protocol/tracing_handler.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/devtools/protocol/tracing_handler.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/renderer_host/input/mouse_latency_browsertest.cc
[add] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/arc_tracing_agent_impl.cc
[add] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/arc_tracing_agent_impl.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/background_tracing_manager_browsertest.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/background_tracing_manager_impl.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/background_tracing_manager_impl.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/background_tracing_rule.cc
[add] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/cros_tracing_agent.cc
[add] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/cros_tracing_agent.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/etw_tracing_agent_win.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/etw_tracing_agent_win.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/memory_tracing_browsertest.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/power_tracing_agent.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/power_tracing_agent.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/trace_message_filter.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/trace_message_filter.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/tracing_controller_browsertest.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/tracing_controller_impl.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/tracing_controller_impl.h
[rename] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/tracing_controller_impl_data_endpoint.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/browser/tracing/tracing_ui.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/child/child_thread_impl.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/child/child_thread_impl.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/browser/BUILD.gn
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/browser/DEPS
[delete] https://crrev.com/f912ff75b23440a67e3674064db799c0f15a7602/content/public/browser/arc_tracing_agent.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/browser/arc_tracing_agent.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/browser/background_tracing_manager.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/browser/tracing_controller.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/browser/tracing_delegate.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/browser/tracing_delegate.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/content/public/test/browser_test_base.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/services/resource_coordinator/public/interfaces/tracing/tracing_constants.mojom
[modify] https://crrev.com/c77b44ebb53886e039c8471548c2050cceceda59/services/resource_coordinator/tracing/coordinator.cc

Comment 34 by sky@chromium.org, Oct 26 2017

Blocking: -731255
Status: Fixed (was: Started)

Sign in to add a comment