diff options
author | erikchen <erikchen@chromium.org> | 2015-03-10 19:34:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-11 02:34:59 +0000 |
commit | 8054a8c554a27280972e92d0370e0cb12abed66c (patch) | |
tree | 4db78886ca3c8d73f4a9f73180e1a8bd81c286dd /content/browser/child_process_launcher.cc | |
parent | 8e9426ed66dcd096e73893691bfb54019dcc9c19 (diff) | |
download | chromium_src-8054a8c554a27280972e92d0370e0cb12abed66c.zip chromium_src-8054a8c554a27280972e92d0370e0cb12abed66c.tar.gz chromium_src-8054a8c554a27280972e92d0370e0cb12abed66c.tar.bz2 |
Add profiling to Context::Notify.
BUG=465841
Review URL: https://codereview.chromium.org/995113002
Cr-Commit-Position: refs/heads/master@{#320034}
Diffstat (limited to 'content/browser/child_process_launcher.cc')
-rw-r--r-- | content/browser/child_process_launcher.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc index 5a7be48..7bf4f49 100644 --- a/content/browser/child_process_launcher.cc +++ b/content/browser/child_process_launcher.cc @@ -14,6 +14,7 @@ #include "base/memory/scoped_ptr.h" #include "base/metrics/histogram.h" #include "base/process/process.h" +#include "base/profiler/scoped_tracker.h" #include "base/synchronization/lock.h" #include "base/threading/thread.h" #include "content/public/browser/browser_thread.h" @@ -458,6 +459,12 @@ void ChildProcessLauncher::Context::Notify( bool zygote, #endif base::Process process) { + // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 + // is fixed. + tracked_objects::ScopedTracker tracking_profile1( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "465841 ChildProcessLauncher::Context::Notify::Start")); + #if defined(OS_ANDROID) // Finally close the ipcfd base::ScopedFD ipcfd_closer = ipcfd_.Pass(); @@ -472,11 +479,26 @@ void ChildProcessLauncher::Context::Notify( #endif if (client_) { if (process_.IsValid()) { + // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 + // is fixed. + tracked_objects::ScopedTracker tracking_profile2( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "465841 ChildProcessLauncher::Context::Notify::ProcessLaunched")); client_->OnProcessLaunched(); } else { + // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 + // is fixed. + tracked_objects::ScopedTracker tracking_profile3( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "465841 ChildProcessLauncher::Context::Notify::ProcessFailed")); client_->OnProcessLaunchFailed(); } } else { + // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 + // is fixed. + tracked_objects::ScopedTracker tracking_profile4( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "465841 ChildProcessLauncher::Context::Notify::ProcessTerminate")); Terminate(); } } |