| Index: content/browser/tracing/tracing_controller_impl.cc
|
| diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
|
| index 6ee070904f460d7cde8af66d833bf4d4a7d81fad..2f9e8118f387567418cfd15bcf5126ee3ceffa3f 100644
|
| --- a/content/browser/tracing/tracing_controller_impl.cc
|
| +++ b/content/browser/tracing/tracing_controller_impl.cc
|
| @@ -11,6 +11,8 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/sys_info.h"
|
| #include "base/trace_event/trace_event.h"
|
| +#include "build/build_config.h"
|
| +#include "components/tracing/process_metrics_memory_dump_provider.h"
|
| #include "content/browser/tracing/file_tracing_provider_impl.h"
|
| #include "content/browser/tracing/power_tracing_agent.h"
|
| #include "content/browser/tracing/trace_message_filter.h"
|
| @@ -586,6 +588,13 @@ void TracingControllerImpl::AddTraceMessageFilter(
|
| return;
|
| }
|
|
|
| +#if defined(OS_LINUX)
|
| + // The browser process dumps process metrics for child process in linux due to
|
| + // sandbox.
|
| + tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
|
| + trace_message_filter->PeerHandle());
|
| +#endif
|
| +
|
| trace_message_filters_.insert(trace_message_filter);
|
| if (can_cancel_watch_event()) {
|
| trace_message_filter->SendSetWatchEvent(watch_category_name_,
|
| @@ -614,6 +623,11 @@ void TracingControllerImpl::RemoveTraceMessageFilter(
|
| return;
|
| }
|
|
|
| +#if defined(OS_LINUX)
|
| + tracing::ProcessMetricsMemoryDumpProvider::UnregisterForProcess(
|
| + trace_message_filter->PeerHandle());
|
| +#endif
|
| +
|
| // If a filter is removed while a response from that filter is pending then
|
| // simulate the response. Otherwise the response count will be wrong and the
|
| // completion callback will never be executed.
|
|
|