diff options
author | justinlin@chromium.org <justinlin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 22:13:39 +0000 |
---|---|---|
committer | justinlin@chromium.org <justinlin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 22:13:39 +0000 |
commit | e025fcba0b95c2ec05519e2104c884c3514abb26 (patch) | |
tree | e491634db2ba58b9574c32fe86bd459ddfb4fa77 /components/tracing | |
parent | 879e7211afa8e1505cc75ce264a6c64da0cab1d9 (diff) | |
download | chromium_src-e025fcba0b95c2ec05519e2104c884c3514abb26.zip chromium_src-e025fcba0b95c2ec05519e2104c884c3514abb26.tar.gz chromium_src-e025fcba0b95c2ec05519e2104c884c3514abb26.tar.bz2 |
Revert "Implement TracingController::{Enable,Disable,Capture}Monitoring"
Revert "Fix failures in chrome os after r227262"
Revert "Fix the content_browser breakage after r227269"
Caused sizes regression on linux for nacl-helper-data.
TBR=haraken
BUG=304789
> Implement TracingController::{Enable,Disable,Capture}Monitoring
>
> This CL implements TracingController::EnableMonitoring,
> TracingController::DisableMonitoring and
> TracingController::CaptureMonitoringSnapshot.
>
> BUG=241743
> TEST=base_unittests::TraceEventTestFixture.TraceContinuousSampling,
> content_browsertests::TracingControllerTest.EnableCaptureAndDisableMonitoring
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226701
>
> R=dsinclair@chromium.org, joi@chromium.org, nduca@chromium.org, tsepez@chromium.org
>
> Review URL: https://codereview.chromium.org/23531042
Review URL: https://codereview.chromium.org/26294003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/tracing')
-rw-r--r-- | components/tracing/child_trace_message_filter.cc | 47 | ||||
-rw-r--r-- | components/tracing/child_trace_message_filter.h | 12 | ||||
-rw-r--r-- | components/tracing/tracing_messages.h | 24 |
3 files changed, 3 insertions, 80 deletions
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc index 9925f3f..8310ec5 100644 --- a/components/tracing/child_trace_message_filter.cc +++ b/components/tracing/child_trace_message_filter.cc @@ -34,10 +34,6 @@ bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(ChildTraceMessageFilter, message) IPC_MESSAGE_HANDLER(TracingMsg_BeginTracing, OnBeginTracing) IPC_MESSAGE_HANDLER(TracingMsg_EndTracing, OnEndTracing) - IPC_MESSAGE_HANDLER(TracingMsg_EnableMonitoring, OnEnableMonitoring) - IPC_MESSAGE_HANDLER(TracingMsg_DisableMonitoring, OnDisableMonitoring) - IPC_MESSAGE_HANDLER(TracingMsg_CaptureMonitoringSnapshot, - OnCaptureMonitoringSnapshot) IPC_MESSAGE_HANDLER(TracingMsg_GetTraceBufferPercentFull, OnGetTraceBufferPercentFull) IPC_MESSAGE_HANDLER(TracingMsg_SetWatchEvent, OnSetWatchEvent) @@ -77,33 +73,6 @@ void ChildTraceMessageFilter::OnEndTracing() { base::Bind(&ChildTraceMessageFilter::OnTraceDataCollected, this)); } -void ChildTraceMessageFilter::OnEnableMonitoring( - const std::string& category_filter_str, - base::TimeTicks browser_time, - int options) { - TraceLog::GetInstance()->SetEnabled( - base::debug::CategoryFilter(category_filter_str), - static_cast<base::debug::TraceLog::Options>(options)); -} - -void ChildTraceMessageFilter::OnDisableMonitoring() { - TraceLog::GetInstance()->SetDisabled(); -} - -void ChildTraceMessageFilter::OnCaptureMonitoringSnapshot() { - // Flush will generate one or more callbacks to - // OnMonitoringTraceDataCollected. It's important that the last - // OnMonitoringTraceDataCollected gets called before - // CaptureMonitoringSnapshotAck below. We are already on the IO thread, - // so the OnMonitoringTraceDataCollected calls will not be deferred. - TraceLog::GetInstance()->FlushButLeaveBufferIntact( - base::Bind(&ChildTraceMessageFilter:: - OnMonitoringTraceDataCollected, - this)); - - channel_->Send(new TracingHostMsg_CaptureMonitoringSnapshotAck()); -} - void ChildTraceMessageFilter::OnGetTraceBufferPercentFull() { float bpf = TraceLog::GetInstance()->GetBufferPercentFull(); @@ -140,22 +109,6 @@ void ChildTraceMessageFilter::OnTraceDataCollected( } } -void ChildTraceMessageFilter::OnMonitoringTraceDataCollected( - const scoped_refptr<base::RefCountedString>& events_str_ptr, - bool has_more_events) { - if (!ipc_message_loop_->BelongsToCurrentThread()) { - ipc_message_loop_->PostTask(FROM_HERE, - base::Bind(&ChildTraceMessageFilter:: - OnMonitoringTraceDataCollected, - this, - events_str_ptr, - has_more_events)); - return; - } - channel_->Send(new TracingHostMsg_MonitoringTraceDataCollected( - events_str_ptr->data())); -} - void ChildTraceMessageFilter::OnTraceNotification(int notification) { if (!ipc_message_loop_->BelongsToCurrentThread()) { ipc_message_loop_->PostTask(FROM_HERE, diff --git a/components/tracing/child_trace_message_filter.h b/components/tracing/child_trace_message_filter.h index cbd300f..9f10b4a 100644 --- a/components/tracing/child_trace_message_filter.h +++ b/components/tracing/child_trace_message_filter.h @@ -32,13 +32,8 @@ class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter { // Message handlers. void OnBeginTracing(const std::string& category_filter_str, base::TimeTicks browser_time, - int options); + int mode); void OnEndTracing(); - void OnEnableMonitoring(const std::string& category_filter_str, - base::TimeTicks browser_time, - int options); - void OnDisableMonitoring(); - void OnCaptureMonitoringSnapshot(); void OnGetTraceBufferPercentFull(); void OnSetWatchEvent(const std::string& category_name, const std::string& event_name); @@ -48,11 +43,6 @@ class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter { void OnTraceDataCollected( const scoped_refptr<base::RefCountedString>& events_str_ptr, bool has_more_events); - - void OnMonitoringTraceDataCollected( - const scoped_refptr<base::RefCountedString>& events_str_ptr, - bool has_more_events); - void OnTraceNotification(int notification); IPC::Channel* channel_; diff --git a/components/tracing/tracing_messages.h b/components/tracing/tracing_messages.h index 25b45bd..9beb7e1 100644 --- a/components/tracing/tracing_messages.h +++ b/components/tracing/tracing_messages.h @@ -24,18 +24,6 @@ IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, // Sent to all child processes to disable trace event recording. IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) -// Sent to all child processes to start monitoring. -IPC_MESSAGE_CONTROL3(TracingMsg_EnableMonitoring, - std::string /* category_filter_str */, - base::TimeTicks /* browser_time */, - int /* base::debug::TraceLog::Options */) - -// Sent to all child processes to stop monitoring.. -IPC_MESSAGE_CONTROL0(TracingMsg_DisableMonitoring) - -// Sent to all child processes to capture the current monitorint snapshot. -IPC_MESSAGE_CONTROL0(TracingMsg_CaptureMonitoringSnapshot) - // Sent to all child processes to get trace buffer fullness. IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceBufferPercentFull) @@ -50,26 +38,18 @@ IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) // Notify the browser that this child process supports tracing. IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing) -// Reply from child processes acking TracingMsg_EndTracing. +// Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false). IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck, std::vector<std::string> /* known_categories */) -// Reply from child processes acking TracingMsg_CaptureMonitoringSnapshot. -IPC_MESSAGE_CONTROL0(TracingHostMsg_CaptureMonitoringSnapshotAck) - // Sent if the trace buffer becomes full. IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceNotification, int /* base::debug::TraceLog::Notification */) -// Child processes send back trace data in JSON chunks. +// Child processes send trace data back in JSON chunks. IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, std::string /*json trace data*/) -// Child processes send back trace data of the current monitoring -// in JSON chunks. -IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected, - std::string /*json trace data*/) - // Reply to TracingMsg_GetTraceBufferPercentFull. IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceBufferPercentFullReply, float /*trace buffer percent full*/) |