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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 9181002: Track parent-child relations during profiling (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | content/browser/profiler_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 119459)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -1152,13 +1152,19 @@
browser_process_.reset(new BrowserProcessImpl(parsed_command_line()));
}
+ // Default to basic profiling (no parent child support).
+ tracked_objects::ThreadData::Status status =
+ tracked_objects::ThreadData::PROFILING_ACTIVE;
if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) {
// User wants to override default tracking status.
std::string flag =
parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling);
- bool enabled = flag.compare("0") != 0;
- tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled);
+ if (flag.compare("0") != 0)
+ status = tracked_objects::ThreadData::DEACTIVATED;
+ else if (flag.compare("child") != 0)
+ status = tracked_objects::ThreadData::PROFILING_CHILDREN_ACTIVE;
}
+ tracked_objects::ThreadData::InitializeAndSetTrackingStatus(status);
ramant (doing other things) 2012/01/28 02:09:55 nit: It looks like this change calls InitializeAnd
jar (doing other things) 2012/01/30 20:41:56 Lazy initialization really gets tracked_objects go
// This forces the TabCloseableStateWatcher to be created and, on chromeos,
// register for the notifications it needs to track the closeable state of
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | content/browser/profiler_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698