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

Unified Diff: components/tracing/child_memory_dump_manager_delegate_impl.h

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 | « base/trace_event/trace_config.cc ('k') | components/tracing/child_memory_dump_manager_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/child_memory_dump_manager_delegate_impl.h
diff --git a/components/tracing/child_memory_dump_manager_delegate_impl.h b/components/tracing/child_memory_dump_manager_delegate_impl.h
index ca5de293ed7f233cd06dcd286806c8161bd97b08..ba2f3d5142041cf6dc07e26884a12fa308547056 100644
--- a/components/tracing/child_memory_dump_manager_delegate_impl.h
+++ b/components/tracing/child_memory_dump_manager_delegate_impl.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
+#include "components/tracing/tracing_messages.h"
namespace base {
class SingleThreadTaskRunner;
@@ -38,15 +39,16 @@ class ChildMemoryDumpManagerDelegateImpl
void SetChildTraceMessageFilter(ChildTraceMessageFilter* ctmf);
- // Pass kInvalidTracingProcessId to invalidate the id.
- void set_tracing_process_id(uint64 id) {
- DCHECK_IMPLIES(
- tracing_process_id_ !=
- base::trace_event::MemoryDumpManager::kInvalidTracingProcessId,
- id == base::trace_event::MemoryDumpManager::kInvalidTracingProcessId ||
- id == tracing_process_id_);
- tracing_process_id_ = id;
- }
+ // Set the child process tracing id and file descriptors for tracing. This
+ // sets tracing_process_id and sends the file decriptor to relevant dump
+ // providers. ResetMemoryTracingInfo should be called at the end of tracing to
+ // close these files which are not supposed to be used in child if not for
+ // tracing.
+ void SetMemoryTracingInfo(
+ const TracingMsg_MemoryTracingInfo& memory_tracing_info);
+
+ // Resets the tracing process id and resets the relevant dump providers.
+ void ResetMemoryTracingInfo();
protected:
// Make CreateProcessDump() visible to ChildTraceMessageFilter.
« no previous file with comments | « base/trace_event/trace_config.cc ('k') | components/tracing/child_memory_dump_manager_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698