| 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 <map> |
| 8 #include <memory> | 9 #include <memory> |
| 9 #include <set> | 10 #include <set> |
| 10 | 11 |
| 11 #include "base/atomicops.h" | 12 #include "base/atomicops.h" |
| 12 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
| 13 #include "base/containers/scoped_ptr_map.h" | |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/singleton.h" | 15 #include "base/memory/singleton.h" |
| 16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
| 18 #include "base/trace_event/memory_dump_request_args.h" | 18 #include "base/trace_event/memory_dump_request_args.h" |
| 19 #include "base/trace_event/process_memory_dump.h" | 19 #include "base/trace_event/process_memory_dump.h" |
| 20 #include "base/trace_event/trace_event.h" | 20 #include "base/trace_event/trace_event.h" |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 | 23 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 const scoped_refptr<SingleThreadTaskRunner>& dump_thread_task_runner); | 179 const scoped_refptr<SingleThreadTaskRunner>& dump_thread_task_runner); |
| 180 ~ProcessMemoryDumpAsyncState(); | 180 ~ProcessMemoryDumpAsyncState(); |
| 181 | 181 |
| 182 // Gets or creates the memory dump container for the given target process. | 182 // Gets or creates the memory dump container for the given target process. |
| 183 ProcessMemoryDump* GetOrCreateMemoryDumpContainerForProcess(ProcessId pid); | 183 ProcessMemoryDump* GetOrCreateMemoryDumpContainerForProcess(ProcessId pid); |
| 184 | 184 |
| 185 // A map of ProcessId -> ProcessMemoryDump, one for each target process | 185 // A map of ProcessId -> ProcessMemoryDump, one for each target process |
| 186 // being dumped from the current process. Typically each process dumps only | 186 // being dumped from the current process. Typically each process dumps only |
| 187 // for itself, unless dump providers specify a different |target_process| in | 187 // for itself, unless dump providers specify a different |target_process| in |
| 188 // MemoryDumpProvider::Options. | 188 // MemoryDumpProvider::Options. |
| 189 ScopedPtrMap<ProcessId, scoped_ptr<ProcessMemoryDump>> process_dumps; | 189 std::map<ProcessId, scoped_ptr<ProcessMemoryDump>> process_dumps; |
| 190 | 190 |
| 191 // The arguments passed to the initial CreateProcessDump() request. | 191 // The arguments passed to the initial CreateProcessDump() request. |
| 192 const MemoryDumpRequestArgs req_args; | 192 const MemoryDumpRequestArgs req_args; |
| 193 | 193 |
| 194 // The |dump_providers_| iterator to the next dump provider that should be | 194 // The |dump_providers_| iterator to the next dump provider that should be |
| 195 // invoked (or dump_providers_.end() if at the end of the sequence). | 195 // invoked (or dump_providers_.end() if at the end of the sequence). |
| 196 MemoryDumpProviderInfoSet::iterator next_dump_provider; | 196 MemoryDumpProviderInfoSet::iterator next_dump_provider; |
| 197 | 197 |
| 198 // The trace-global session state. | 198 // The trace-global session state. |
| 199 scoped_refptr<MemoryDumpSessionState> session_state; | 199 scoped_refptr<MemoryDumpSessionState> session_state; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 302 } |
| 303 | 303 |
| 304 private: | 304 private: |
| 305 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); | 305 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); |
| 306 }; | 306 }; |
| 307 | 307 |
| 308 } // namespace trace_event | 308 } // namespace trace_event |
| 309 } // namespace base | 309 } // namespace base |
| 310 | 310 |
| 311 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 311 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
| OLD | NEW |