Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: content/child/child_thread_impl.cc

Issue 1333873002: [tracing] Fix MemoryDumpManager to support startup tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re dsinclair #5 (nits, invert Initialize args) Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/tracing/tracing_controller_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 #include "base/metrics/field_trial.h" 21 #include "base/metrics/field_trial.h"
22 #include "base/process/process.h" 22 #include "base/process/process.h"
23 #include "base/process/process_handle.h" 23 #include "base/process/process_handle.h"
24 #include "base/single_thread_task_runner.h" 24 #include "base/single_thread_task_runner.h"
25 #include "base/strings/string_number_conversions.h" 25 #include "base/strings/string_number_conversions.h"
26 #include "base/strings/string_util.h" 26 #include "base/strings/string_util.h"
27 #include "base/synchronization/condition_variable.h" 27 #include "base/synchronization/condition_variable.h"
28 #include "base/synchronization/lock.h" 28 #include "base/synchronization/lock.h"
29 #include "base/thread_task_runner_handle.h" 29 #include "base/thread_task_runner_handle.h"
30 #include "base/threading/thread_local.h" 30 #include "base/threading/thread_local.h"
31 #include "base/trace_event/memory_dump_manager.h"
32 #include "base/tracked_objects.h" 31 #include "base/tracked_objects.h"
33 #include "components/tracing/child_trace_message_filter.h" 32 #include "components/tracing/child_trace_message_filter.h"
34 #include "content/child/child_discardable_shared_memory_manager.h" 33 #include "content/child/child_discardable_shared_memory_manager.h"
35 #include "content/child/child_gpu_memory_buffer_manager.h" 34 #include "content/child/child_gpu_memory_buffer_manager.h"
36 #include "content/child/child_histogram_message_filter.h" 35 #include "content/child/child_histogram_message_filter.h"
37 #include "content/child/child_process.h" 36 #include "content/child/child_process.h"
38 #include "content/child/child_resource_message_filter.h" 37 #include "content/child/child_resource_message_filter.h"
39 #include "content/child/child_shared_bitmap_manager.h" 38 #include "content/child/child_shared_bitmap_manager.h"
40 #include "content/child/fileapi/file_system_dispatcher.h" 39 #include "content/child/fileapi/file_system_dispatcher.h"
41 #include "content/child/fileapi/webfilesystem_impl.h" 40 #include "content/child/fileapi/webfilesystem_impl.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 #if defined(OS_ANDROID) 487 #if defined(OS_ANDROID)
489 g_quit_closure.Get().BindToMainThread(); 488 g_quit_closure.Get().BindToMainThread();
490 #endif 489 #endif
491 490
492 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) 491 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED)
493 trace_memory_controller_.reset(new base::trace_event::TraceMemoryController( 492 trace_memory_controller_.reset(new base::trace_event::TraceMemoryController(
494 message_loop_->task_runner(), ::HeapProfilerWithPseudoStackStart, 493 message_loop_->task_runner(), ::HeapProfilerWithPseudoStackStart,
495 ::HeapProfilerStop, ::GetHeapProfile)); 494 ::HeapProfilerStop, ::GetHeapProfile));
496 #endif 495 #endif
497 496
498 base::trace_event::MemoryDumpManager::GetInstance()->Initialize();
499
500 shared_bitmap_manager_.reset( 497 shared_bitmap_manager_.reset(
501 new ChildSharedBitmapManager(thread_safe_sender())); 498 new ChildSharedBitmapManager(thread_safe_sender()));
502 499
503 gpu_memory_buffer_manager_.reset( 500 gpu_memory_buffer_manager_.reset(
504 new ChildGpuMemoryBufferManager(thread_safe_sender())); 501 new ChildGpuMemoryBufferManager(thread_safe_sender()));
505 502
506 discardable_shared_memory_manager_.reset( 503 discardable_shared_memory_manager_.reset(
507 new ChildDiscardableSharedMemoryManager(thread_safe_sender())); 504 new ChildDiscardableSharedMemoryManager(thread_safe_sender()));
508 } 505 }
509 506
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 void ChildThreadImpl::EnsureConnected() { 737 void ChildThreadImpl::EnsureConnected() {
741 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; 738 VLOG(0) << "ChildThreadImpl::EnsureConnected()";
742 base::Process::Current().Terminate(0, false); 739 base::Process::Current().Terminate(0, false);
743 } 740 }
744 741
745 bool ChildThreadImpl::IsInBrowserProcess() const { 742 bool ChildThreadImpl::IsInBrowserProcess() const {
746 return browser_process_io_runner_; 743 return browser_process_io_runner_;
747 } 744 }
748 745
749 } // namespace content 746 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698