| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // dump requests. The embedder should return true if the |pmd| was | 49 // dump requests. The embedder should return true if the |pmd| was |
| 50 // successfully populated, false if something went wrong and the dump should | 50 // successfully populated, false if something went wrong and the dump should |
| 51 // be considered invalid. | 51 // be considered invalid. |
| 52 // (Note, the MemoryDumpManager has a fail-safe logic which will disable the | 52 // (Note, the MemoryDumpManager has a fail-safe logic which will disable the |
| 53 // MemoryDumpProvider for the entire trace session if it fails consistently). | 53 // MemoryDumpProvider for the entire trace session if it fails consistently). |
| 54 virtual bool OnMemoryDump(const MemoryDumpArgs& args, | 54 virtual bool OnMemoryDump(const MemoryDumpArgs& args, |
| 55 ProcessMemoryDump* pmd) = 0; | 55 ProcessMemoryDump* pmd) = 0; |
| 56 | 56 |
| 57 // Called by the MemoryDumpManager when an allocator should start or stop | 57 // Called by the MemoryDumpManager when an allocator should start or stop |
| 58 // collecting extensive allocation data, if supported. | 58 // collecting extensive allocation data, if supported. |
| 59 virtual void OnHeapProfilingEnabled(bool enabled) {} | 59 virtual void OnHeapProfilingEnabled(bool) {} |
| 60 | 60 |
| 61 protected: | 61 protected: |
| 62 MemoryDumpProvider() {} | 62 MemoryDumpProvider() {} |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProvider); | 64 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProvider); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace trace_event | 67 } // namespace trace_event |
| 68 } // namespace base | 68 } // namespace base |
| 69 | 69 |
| 70 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ | 70 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ |
| OLD | NEW |