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

Side by Side Diff: components/tracing/common/process_metrics_memory_dump_provider.h

Issue 2710163002: Implement basic support for Windows module emission. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_TRACING_COMMON_PROCESS_MEMORY_METRICS_DUMP_PROVIDER_H_ 5 #ifndef COMPONENTS_TRACING_COMMON_PROCESS_MEMORY_METRICS_DUMP_PROVIDER_H_
6 #define COMPONENTS_TRACING_COMMON_PROCESS_MEMORY_METRICS_DUMP_PROVIDER_H_ 6 #define COMPONENTS_TRACING_COMMON_PROCESS_MEMORY_METRICS_DUMP_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
(...skipping 30 matching lines...) Expand all
41 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, 41 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest,
42 ParseProcSmaps); 42 ParseProcSmaps);
43 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, DumpRSS); 43 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, DumpRSS);
44 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, 44 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest,
45 TestPollFastMemoryTotal); 45 TestPollFastMemoryTotal);
46 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
47 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, 47 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest,
48 TestMachOReading); 48 TestMachOReading);
49 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest, 49 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest,
50 NoDuplicateRegions); 50 NoDuplicateRegions);
51 #endif // defined(OS_MACOSX) 51 #endif // defined(OS_MACOSX)
awong 2017/02/23 22:05:44 #elif?
Wez 2017/02/23 23:35:03 Or just rename the platform-specific module readin
52 #if defined(OS_WIN)
53 FRIEND_TEST_ALL_PREFIXES(ProcessMetricsMemoryDumpProviderTest,
54 TestWinModuleReading);
55 #endif // defined(OS_WIN)
52 56
53 ProcessMetricsMemoryDumpProvider(base::ProcessId process); 57 ProcessMetricsMemoryDumpProvider(base::ProcessId process);
54 58
55 bool DumpProcessTotals(const base::trace_event::MemoryDumpArgs& args, 59 bool DumpProcessTotals(const base::trace_event::MemoryDumpArgs& args,
56 base::trace_event::ProcessMemoryDump* pmd); 60 base::trace_event::ProcessMemoryDump* pmd);
57 bool DumpProcessMemoryMaps(const base::trace_event::MemoryDumpArgs& args, 61 bool DumpProcessMemoryMaps(const base::trace_event::MemoryDumpArgs& args,
58 base::trace_event::ProcessMemoryDump* pmd); 62 base::trace_event::ProcessMemoryDump* pmd);
59 63
60 static uint64_t rss_bytes_for_testing; 64 static uint64_t rss_bytes_for_testing;
61 65
(...skipping 11 matching lines...) Expand all
73 // older than http://bit.ly/reset_rss or only on child processes if yama LSM 77 // older than http://bit.ly/reset_rss or only on child processes if yama LSM
74 // sandbox is enabled. 78 // sandbox is enabled.
75 bool is_rss_peak_resettable_; 79 bool is_rss_peak_resettable_;
76 80
77 DISALLOW_COPY_AND_ASSIGN(ProcessMetricsMemoryDumpProvider); 81 DISALLOW_COPY_AND_ASSIGN(ProcessMetricsMemoryDumpProvider);
78 }; 82 };
79 83
80 } // namespace tracing 84 } // namespace tracing
81 85
82 #endif // COMPONENTS_TRACING_COMMON_PROCESS_MEMORY_METRICS_DUMP_PROVIDER_H_ 86 #endif // COMPONENTS_TRACING_COMMON_PROCESS_MEMORY_METRICS_DUMP_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698