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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 1329273002: [tracing] Send smaps file desciptor to child process for tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/tracing/child_trace_message_filter.h ('k') | components/tracing/tracing_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/child_trace_message_filter.cc
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 62e13aec2c0ed8f4ef3bdc84056f24211a509c23..782ff54685e1bbee7222932a1e6e7b85d32bf1d4 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -7,7 +7,6 @@
#include "base/metrics/statistics_recorder.h"
#include "base/trace_event/trace_event.h"
#include "components/tracing/child_memory_dump_manager_delegate_impl.h"
-#include "components/tracing/tracing_messages.h"
#include "ipc/ipc_channel.h"
using base::trace_event::TraceLog;
@@ -69,7 +68,7 @@ ChildTraceMessageFilter::~ChildTraceMessageFilter() {}
void ChildTraceMessageFilter::OnBeginTracing(
const std::string& trace_config_str,
base::TraceTicks browser_time,
- uint64 tracing_process_id) {
+ TracingMsg_MemoryTracingInfo memory_tracing_info) {
#if defined(__native_client__)
// NaCl and system times are offset by a bit, so subtract some time from
// the captured timestamps. The value might be off by a bit due to messaging
@@ -77,14 +76,16 @@ void ChildTraceMessageFilter::OnBeginTracing(
base::TimeDelta time_offset = base::TraceTicks::Now() - browser_time;
TraceLog::GetInstance()->SetTimeOffset(time_offset);
#endif
- ChildMemoryDumpManagerDelegateImpl::GetInstance()->set_tracing_process_id(
- tracing_process_id);
+ ChildMemoryDumpManagerDelegateImpl::GetInstance()->SetMemoryTracingInfo(
+ memory_tracing_info);
TraceLog::GetInstance()->SetEnabled(
base::trace_event::TraceConfig(trace_config_str),
base::trace_event::TraceLog::RECORDING_MODE);
}
void ChildTraceMessageFilter::OnEndTracing() {
+ ChildMemoryDumpManagerDelegateImpl::GetInstance()->ResetMemoryTracingInfo();
+
TraceLog::GetInstance()->SetDisabled();
// Flush will generate one or more callbacks to OnTraceDataCollected
@@ -93,9 +94,6 @@ void ChildTraceMessageFilter::OnEndTracing() {
// OnTraceDataCollected calls will not be deferred.
TraceLog::GetInstance()->Flush(
base::Bind(&ChildTraceMessageFilter::OnTraceDataCollected, this));
-
- ChildMemoryDumpManagerDelegateImpl::GetInstance()->set_tracing_process_id(
- base::trace_event::MemoryDumpManager::kInvalidTracingProcessId);
}
void ChildTraceMessageFilter::OnCancelTracing() {
« no previous file with comments | « components/tracing/child_trace_message_filter.h ('k') | components/tracing/tracing_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698