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

Side by Side Diff: base/trace_event/process_memory_totals_dump_provider.h

Issue 1617263002: Revert of [tracing] Dump child processes' memory metrics in browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Patch Set: Created 4 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_TOTALS_DUMP_PROVIDER_H_
6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_TOTALS_DUMP_PROVIDER_H_
7
8 #include <stdint.h>
9
10 #include "base/gtest_prod_util.h"
11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/singleton.h"
14 #include "base/trace_event/memory_dump_provider.h"
15
16 namespace base {
17
18 class ProcessMetrics;
19
20 namespace trace_event {
21
22 // Dump provider which collects process-wide memory stats.
23 class BASE_EXPORT ProcessMemoryTotalsDumpProvider : public MemoryDumpProvider {
24 public:
25 static ProcessMemoryTotalsDumpProvider* GetInstance();
26
27 // MemoryDumpProvider implementation.
28 bool OnMemoryDump(const MemoryDumpArgs& args,
29 ProcessMemoryDump* pmd) override;
30
31 private:
32 friend struct DefaultSingletonTraits<ProcessMemoryTotalsDumpProvider>;
33 FRIEND_TEST_ALL_PREFIXES(ProcessMemoryTotalsDumpProviderTest, DumpRSS);
34
35 static uint64_t rss_bytes_for_testing;
36
37 ProcessMemoryTotalsDumpProvider();
38 ~ProcessMemoryTotalsDumpProvider() override;
39
40 scoped_ptr<ProcessMetrics> process_metrics_;
41
42 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryTotalsDumpProvider);
43 };
44
45 } // namespace trace_event
46 } // namespace base
47
48 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_TOTALS_DUMP_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698