Chromium Code Reviews| Index: components/tracing/common/process_metrics_memory_dump_provider.h |
| diff --git a/components/tracing/common/process_metrics_memory_dump_provider.h b/components/tracing/common/process_metrics_memory_dump_provider.h |
| index b47bdec142b7145feaf31af18dd4a7ecaad61010..3066f9d02164b8f0eeb994b3b96ab283c3950c0f 100644 |
| --- a/components/tracing/common/process_metrics_memory_dump_provider.h |
| +++ b/components/tracing/common/process_metrics_memory_dump_provider.h |
| @@ -33,11 +33,15 @@ class TRACING_EXPORT ProcessMetricsMemoryDumpProvider |
| // MemoryDumpProvider implementation. |
| bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| base::trace_event::ProcessMemoryDump* pmd) override; |
| + void PollFastMemoryTotal(uint64_t* memory_total) override; |
| + void SetFastMemoryPollingEnabled(bool enabled) override; |
| private: |
| FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, |
| ParseProcSmaps); |
| FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, DumpRSS); |
| + FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, |
| + TestPollFastMemoryTotal); |
| ProcessMetricsMemoryDumpProvider(base::ProcessId process); |
| @@ -50,6 +54,12 @@ class TRACING_EXPORT ProcessMetricsMemoryDumpProvider |
| #if defined(OS_LINUX) || defined(OS_ANDROID) |
| static FILE* proc_smaps_for_testing; |
| + |
| + void set_fast_polling_statm_fd_for_testing(int fd) { |
|
Primiano Tucci (use gerrit)
2016/12/15 15:00:02
maybe use the same pattern as above:
static int p
ssid
2016/12/16 03:16:41
Done.
|
| + fast_polling_statm_fd_ = fd; |
| + } |
| + |
| + int fast_polling_statm_fd_; |
| #endif |
| base::ProcessId process_; |