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 #include "base/trace_event/memory_dump_manager.h" | 5 #include "base/trace_event/memory_dump_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 } // AutoLock(lock_) | 309 } // AutoLock(lock_) |
310 | 310 |
311 // Invoke the dump provider without holding the |lock_|. | 311 // Invoke the dump provider without holding the |lock_|. |
312 bool finalize = false; | 312 bool finalize = false; |
313 bool dump_successful = false; | 313 bool dump_successful = false; |
314 | 314 |
315 // TODO(ssid): Change RequestGlobalDump to use MemoryDumpArgs along with | 315 // TODO(ssid): Change RequestGlobalDump to use MemoryDumpArgs along with |
316 // MemoryDumpType to get request for light / heavy dump, and remove this | 316 // MemoryDumpType to get request for light / heavy dump, and remove this |
317 // constant. | 317 // constant. |
318 if (!skip_dump) { | 318 if (!skip_dump) { |
319 MemoryDumpArgs dump_args = {MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; | 319 MemoryDumpArgs dump_args = {MemoryDumpArgs::LevelOfDetail::HIGH}; |
320 dump_successful = | 320 dump_successful = |
321 mdp->OnMemoryDump(dump_args, &pmd_async_state->process_memory_dump); | 321 mdp->OnMemoryDump(dump_args, &pmd_async_state->process_memory_dump); |
322 } | 322 } |
323 | 323 |
324 { | 324 { |
325 AutoLock lock(lock_); | 325 AutoLock lock(lock_); |
326 if (did_unregister_dump_provider_) { | 326 if (did_unregister_dump_provider_) { |
327 return AbortDumpLocked(pmd_async_state->callback, | 327 return AbortDumpLocked(pmd_async_state->callback, |
328 pmd_async_state->task_runner, | 328 pmd_async_state->task_runner, |
329 pmd_async_state->req_args.dump_guid); | 329 pmd_async_state->req_args.dump_guid); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 next_dump_provider(next_dump_provider), | 482 next_dump_provider(next_dump_provider), |
483 callback(callback), | 483 callback(callback), |
484 task_runner(MessageLoop::current()->task_runner()) { | 484 task_runner(MessageLoop::current()->task_runner()) { |
485 } | 485 } |
486 | 486 |
487 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() { | 487 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() { |
488 } | 488 } |
489 | 489 |
490 } // namespace trace_event | 490 } // namespace trace_event |
491 } // namespace base | 491 } // namespace base |
OLD | NEW |