| Index: content/browser/tracing/etw_system_event_consumer_win.cc
|
| diff --git a/content/browser/tracing/etw_system_event_consumer_win.cc b/content/browser/tracing/etw_system_event_consumer_win.cc
|
| index 529800f2202c48f7efce6795e2475e7acf20e0aa..644a56fbb4037119184ff1e7ed6000482da66c6a 100644
|
| --- a/content/browser/tracing/etw_system_event_consumer_win.cc
|
| +++ b/content/browser/tracing/etw_system_event_consumer_win.cc
|
| @@ -36,8 +36,12 @@ EtwSystemEventConsumer::EtwSystemEventConsumer()
|
| EtwSystemEventConsumer::~EtwSystemEventConsumer() {
|
| }
|
|
|
| -bool EtwSystemEventConsumer::StartSystemTracing() {
|
| +std::string EtwSystemEventConsumer::GetTracingAgentName() {
|
| + return kETWTracingAgentName;
|
| +}
|
|
|
| +bool EtwSystemEventConsumer::StartAgentTracing(
|
| + const base::trace_event::TraceConfig& trace_config) {
|
| // Activate kernel tracing.
|
| if (!StartKernelSessionTracing())
|
| return false;
|
| @@ -52,14 +56,15 @@ bool EtwSystemEventConsumer::StartSystemTracing() {
|
| return true;
|
| }
|
|
|
| -void EtwSystemEventConsumer::StopSystemTracing(const OutputCallback& callback) {
|
| +void EtwSystemEventConsumer::StopAgentTracing(
|
| + const StopAgentTracingCallback& callback) {
|
| // Deactivate kernel tracing.
|
| if (!StopKernelSessionTracing()) {
|
| LOG(FATAL) << "Could not stop system tracing.";
|
| }
|
|
|
| // Stop consuming and flush events.
|
| - OutputCallback on_stop_system_tracing_done_callback =
|
| + StopAgentTracingCallback on_stop_system_tracing_done_callback =
|
| base::Bind(&EtwSystemEventConsumer::OnStopSystemTracingDone,
|
| base::Unretained(this),
|
| callback);
|
| @@ -69,7 +74,7 @@ void EtwSystemEventConsumer::StopSystemTracing(const OutputCallback& callback) {
|
| }
|
|
|
| void EtwSystemEventConsumer::OnStopSystemTracingDone(
|
| - const OutputCallback& callback,
|
| + const StopAgentTracingCallback& callback,
|
| const scoped_refptr<base::RefCountedString>& result) {
|
|
|
| // Stop the consumer thread.
|
| @@ -79,6 +84,19 @@ void EtwSystemEventConsumer::OnStopSystemTracingDone(
|
| callback.Run(result);
|
| }
|
|
|
| +bool EtwSystemEventConsumer::SupportsExplicitClockSync() {
|
| + return false;
|
| +}
|
| +
|
| +void EtwSystemEventConsumer::RecordClockSyncMarker(
|
| + scoped_ptr<base::DictionaryValue> marker) {
|
| + DCHECK(SupportsExplicitClockSync());
|
| +}
|
| +
|
| +void EtwSystemEventConsumer::IssueClockSyncMarker() {
|
| + DCHECK(SupportsExplicitClockSync());
|
| +}
|
| +
|
| bool EtwSystemEventConsumer::StartKernelSessionTracing() {
|
| // Enabled flags (tracing facilities).
|
| uint32 enabled_flags = EVENT_TRACE_FLAG_IMAGE_LOAD |
|
| @@ -209,7 +227,8 @@ void EtwSystemEventConsumer::TraceAndConsumeOnThread() {
|
| Close();
|
| }
|
|
|
| -void EtwSystemEventConsumer::FlushOnThread(const OutputCallback& callback) {
|
| +void EtwSystemEventConsumer::FlushOnThread(
|
| + const StopAgentTracingCallback& callback) {
|
| // Add the header information to the stream.
|
| scoped_ptr<base::DictionaryValue> header(new base::DictionaryValue());
|
| header->Set("name", new base::StringValue("ETW"));
|
|
|