| 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_MANAGER_H_ | 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
| 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class MemoryDumpManagerDelegate; | 33 class MemoryDumpManagerDelegate; |
| 34 class MemoryDumpProvider; | 34 class MemoryDumpProvider; |
| 35 class MemoryDumpSessionState; | 35 class MemoryDumpSessionState; |
| 36 | 36 |
| 37 // This is the interface exposed to the rest of the codebase to deal with | 37 // This is the interface exposed to the rest of the codebase to deal with |
| 38 // memory tracing. The main entry point for clients is represented by | 38 // memory tracing. The main entry point for clients is represented by |
| 39 // RequestDumpPoint(). The extension by Un(RegisterDumpProvider). | 39 // RequestDumpPoint(). The extension by Un(RegisterDumpProvider). |
| 40 class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { | 40 class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { |
| 41 public: | 41 public: |
| 42 static const char* const kTraceCategory; | 42 static const char* const kTraceCategory; |
| 43 static const char* const kLogPrefix; |
| 43 | 44 |
| 44 // This value is returned as the tracing id of the child processes by | 45 // This value is returned as the tracing id of the child processes by |
| 45 // GetTracingProcessId() when tracing is not enabled. | 46 // GetTracingProcessId() when tracing is not enabled. |
| 46 static const uint64_t kInvalidTracingProcessId; | 47 static const uint64_t kInvalidTracingProcessId; |
| 47 | 48 |
| 48 static MemoryDumpManager* GetInstance(); | 49 static MemoryDumpManager* GetInstance(); |
| 49 | 50 |
| 50 // Invoked once per process to listen to trace begin / end events. | 51 // Invoked once per process to listen to trace begin / end events. |
| 51 // Initialization can happen after (Un)RegisterMemoryDumpProvider() calls | 52 // Initialization can happen after (Un)RegisterMemoryDumpProvider() calls |
| 52 // and the MemoryDumpManager guarantees to support this. | 53 // and the MemoryDumpManager guarantees to support this. |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 397 } |
| 397 | 398 |
| 398 private: | 399 private: |
| 399 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); | 400 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); |
| 400 }; | 401 }; |
| 401 | 402 |
| 402 } // namespace trace_event | 403 } // namespace trace_event |
| 403 } // namespace base | 404 } // namespace base |
| 404 | 405 |
| 405 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 406 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
| OLD | NEW |