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_MEMORY_DUMP_PROVIDER_H_ | 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ |
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ | 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // Called by the MemoryDumpManager when generating memory dumps. | 41 // Called by the MemoryDumpManager when generating memory dumps. |
42 // The |args| specify if the embedder should generate light/heavy dumps on | 42 // The |args| specify if the embedder should generate light/heavy dumps on |
43 // dump requests. The embedder should return true if the |pmd| was | 43 // dump requests. The embedder should return true if the |pmd| was |
44 // successfully populated, false if something went wrong and the dump should | 44 // successfully populated, false if something went wrong and the dump should |
45 // be considered invalid. | 45 // be considered invalid. |
46 // (Note, the MemoryDumpManager has a fail-safe logic which will disable the | 46 // (Note, the MemoryDumpManager has a fail-safe logic which will disable the |
47 // MemoryDumpProvider for the entire trace session if it fails consistently). | 47 // MemoryDumpProvider for the entire trace session if it fails consistently). |
48 virtual bool OnMemoryDump(const MemoryDumpArgs& args, | 48 virtual bool OnMemoryDump(const MemoryDumpArgs& args, |
49 ProcessMemoryDump* pmd) = 0; | 49 ProcessMemoryDump* pmd) = 0; |
50 | 50 |
51 // Called by the MemoryDumpManager when an allocator should start or stop | 51 // Called by the MemoryDumpManager when an allocator should start collecting |
52 // collecting extensive allocation data, if supported. | 52 // extensive allocation data, if supported. |
53 virtual void OnHeapProfilingEnabled(bool enabled) {} | 53 virtual void OnHeapProfilingEnabled() {} |
54 | 54 |
55 protected: | 55 protected: |
56 MemoryDumpProvider() {} | 56 MemoryDumpProvider() {} |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProvider); | 58 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProvider); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace trace_event | 61 } // namespace trace_event |
62 } // namespace base | 62 } // namespace base |
63 | 63 |
64 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ | 64 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ |
OLD | NEW |