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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // the dump. This is a copy of |dump_providers_| at the beginning of a dump | 231 // the dump. This is a copy of |dump_providers_| at the beginning of a dump |
232 // and becomes empty at the end, when all dump providers have been invoked. | 232 // and becomes empty at the end, when all dump providers have been invoked. |
233 std::vector<scoped_refptr<MemoryDumpProviderInfo>> pending_dump_providers; | 233 std::vector<scoped_refptr<MemoryDumpProviderInfo>> pending_dump_providers; |
234 | 234 |
235 // The trace-global session state. | 235 // The trace-global session state. |
236 scoped_refptr<MemoryDumpSessionState> session_state; | 236 scoped_refptr<MemoryDumpSessionState> session_state; |
237 | 237 |
238 // Callback passed to the initial call to CreateProcessDump(). | 238 // Callback passed to the initial call to CreateProcessDump(). |
239 MemoryDumpCallback callback; | 239 MemoryDumpCallback callback; |
240 | 240 |
| 241 // The |success| field that will be passed as argument to the |callback|. |
| 242 bool dump_successful; |
| 243 |
241 // The thread on which FinalizeDumpAndAddToTrace() (and hence |callback|) | 244 // The thread on which FinalizeDumpAndAddToTrace() (and hence |callback|) |
242 // should be invoked. This is the thread on which the initial | 245 // should be invoked. This is the thread on which the initial |
243 // CreateProcessDump() request was called. | 246 // CreateProcessDump() request was called. |
244 const scoped_refptr<SingleThreadTaskRunner> callback_task_runner; | 247 const scoped_refptr<SingleThreadTaskRunner> callback_task_runner; |
245 | 248 |
246 // The thread on which unbound dump providers should be invoked. | 249 // The thread on which unbound dump providers should be invoked. |
247 // This is essentially |dump_thread_|.task_runner() but needs to be kept | 250 // This is essentially |dump_thread_|.task_runner() but needs to be kept |
248 // as a separate variable as it needs to be accessed by arbitrary dumpers' | 251 // as a separate variable as it needs to be accessed by arbitrary dumpers' |
249 // threads outside of the lock_ to avoid races when disabling tracing. | 252 // threads outside of the lock_ to avoid races when disabling tracing. |
250 // It is immutable for all the duration of a tracing session. | 253 // It is immutable for all the duration of a tracing session. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 } | 346 } |
344 | 347 |
345 private: | 348 private: |
346 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); | 349 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); |
347 }; | 350 }; |
348 | 351 |
349 } // namespace trace_event | 352 } // namespace trace_event |
350 } // namespace base | 353 } // namespace base |
351 | 354 |
352 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 355 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
OLD | NEW |