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

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

Issue 1128733002: Update from https://crrev.com/328418 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « base/trace_event/trace_event_unittest.cc ('k') | base/trace_event/winheap_dump_provider_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_ 5 #ifndef BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_
6 #define BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_ 6 #define BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 11 matching lines...) Expand all
22 }; 22 };
23 23
24 // Dump provider which collects process-wide heap memory stats. This provider 24 // Dump provider which collects process-wide heap memory stats. This provider
25 // iterates over all the heaps of the current process to gather some metrics 25 // iterates over all the heaps of the current process to gather some metrics
26 // about them. 26 // about them.
27 class BASE_EXPORT WinHeapDumpProvider : public MemoryDumpProvider { 27 class BASE_EXPORT WinHeapDumpProvider : public MemoryDumpProvider {
28 public: 28 public:
29 static WinHeapDumpProvider* GetInstance(); 29 static WinHeapDumpProvider* GetInstance();
30 30
31 // MemoryDumpProvider implementation. 31 // MemoryDumpProvider implementation.
32 bool DumpInto(ProcessMemoryDump* pmd) override; 32 bool OnMemoryDump(ProcessMemoryDump* pmd) override;
33 const char* GetFriendlyName() const override;
34 33
35 private: 34 private:
36 friend struct DefaultSingletonTraits<WinHeapDumpProvider>; 35 friend struct DefaultSingletonTraits<WinHeapDumpProvider>;
37 36
38 // Retrieves the information about given heap. The |heap_info| should contain 37 // Retrieves the information about given heap. The |heap_info| should contain
39 // a valid handle to an existing heap. The blocks contained in the 38 // a valid handle to an existing heap. The blocks contained in the
40 // |block_to_skip| set will be ignored. 39 // |block_to_skip| set will be ignored.
41 bool GetHeapInformation(WinHeapInfo* heap_info, 40 bool GetHeapInformation(WinHeapInfo* heap_info,
42 const std::set<void*>& block_to_skip); 41 const std::set<void*>& block_to_skip);
43 42
44 WinHeapDumpProvider() {} 43 WinHeapDumpProvider() {}
45 ~WinHeapDumpProvider() override {} 44 ~WinHeapDumpProvider() override {}
46 45
47 DISALLOW_COPY_AND_ASSIGN(WinHeapDumpProvider); 46 DISALLOW_COPY_AND_ASSIGN(WinHeapDumpProvider);
48 }; 47 };
49 48
50 } // namespace trace_event 49 } // namespace trace_event
51 } // namespace base 50 } // namespace base
52 51
53 #endif // BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_ 52 #endif // BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_unittest.cc ('k') | base/trace_event/winheap_dump_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698