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

Unified Diff: base/trace_event/process_memory_totals_dump_provider.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
Index: base/trace_event/process_memory_totals_dump_provider.h
diff --git a/base/trace_event/process_memory_totals_dump_provider.h b/base/trace_event/process_memory_totals_dump_provider.h
index 66d4f9956dd5b9144f2352f55209a249e8742017..b443010a49a0903356d4a02c4d4b563ec3f244d5 100644
--- a/base/trace_event/process_memory_totals_dump_provider.h
+++ b/base/trace_event/process_memory_totals_dump_provider.h
@@ -5,6 +5,7 @@
#ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_TOTALS_DUMP_PROVIDER_H_
#define BASE_TRACE_EVENT_PROCESS_MEMORY_TOTALS_DUMP_PROVIDER_H_
+#include "base/files/scoped_file.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
@@ -25,6 +26,11 @@ class BASE_EXPORT ProcessMemoryTotalsDumpProvider : public MemoryDumpProvider {
bool OnMemoryDump(const MemoryDumpArgs& args,
ProcessMemoryDump* pmd) override;
+#if defined(OS_LINUX)
+ void set_proc_status_fd(int fd) { proc_status_fd_.reset(fd); }
+ void reset_proc_status_fd() { proc_status_fd_.reset(); }
+#endif
+
private:
friend struct DefaultSingletonTraits<ProcessMemoryTotalsDumpProvider>;
FRIEND_TEST_ALL_PREFIXES(ProcessMemoryTotalsDumpProviderTest, DumpRSS);
@@ -36,6 +42,10 @@ class BASE_EXPORT ProcessMemoryTotalsDumpProvider : public MemoryDumpProvider {
scoped_ptr<ProcessMetrics> process_metrics_;
+#if defined(OS_LINUX)
+ ScopedFD proc_status_fd_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(ProcessMemoryTotalsDumpProvider);
};
« no previous file with comments | « base/trace_event/process_memory_maps_dump_provider.cc ('k') | base/trace_event/process_memory_totals_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698