OLD | NEW |
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 15 matching lines...) Expand all Loading... |
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 // Name of the allocated_objects dump. Use this to declare suballocator dumps | 29 // Name of the allocated_objects dump. Use this to declare suballocator dumps |
30 // from other dump providers. | 30 // from other dump providers. |
31 static const char kAllocatedObjects[]; | 31 static const char kAllocatedObjects[]; |
32 | 32 |
33 static WinHeapDumpProvider* GetInstance(); | 33 static WinHeapDumpProvider* GetInstance(); |
34 | 34 |
35 // MemoryDumpProvider implementation. | 35 // MemoryDumpProvider implementation. |
36 bool OnMemoryDump(ProcessMemoryDump* pmd) override; | 36 bool OnMemoryDump(const MemoryDumpArgs& args, |
| 37 ProcessMemoryDump* pmd) override; |
37 | 38 |
38 private: | 39 private: |
39 friend struct DefaultSingletonTraits<WinHeapDumpProvider>; | 40 friend struct DefaultSingletonTraits<WinHeapDumpProvider>; |
40 | 41 |
41 // Retrieves the information about given heap. The |heap_info| should contain | 42 // Retrieves the information about given heap. The |heap_info| should contain |
42 // a valid handle to an existing heap. The blocks contained in the | 43 // a valid handle to an existing heap. The blocks contained in the |
43 // |block_to_skip| set will be ignored. | 44 // |block_to_skip| set will be ignored. |
44 bool GetHeapInformation(WinHeapInfo* heap_info, | 45 bool GetHeapInformation(WinHeapInfo* heap_info, |
45 const std::set<void*>& block_to_skip); | 46 const std::set<void*>& block_to_skip); |
46 | 47 |
47 WinHeapDumpProvider() {} | 48 WinHeapDumpProvider() {} |
48 ~WinHeapDumpProvider() override {} | 49 ~WinHeapDumpProvider() override {} |
49 | 50 |
50 DISALLOW_COPY_AND_ASSIGN(WinHeapDumpProvider); | 51 DISALLOW_COPY_AND_ASSIGN(WinHeapDumpProvider); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace trace_event | 54 } // namespace trace_event |
54 } // namespace base | 55 } // namespace base |
55 | 56 |
56 #endif // BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_ | 57 #endif // BASE_TRACE_EVENT_WINHEAP_DUMP_PROVIDER_WIN_H_ |
OLD | NEW |