summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvadimt <vadimt@chromium.org>2014-12-12 08:22:53 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-12 16:23:22 +0000
commit2c706e549bd27317f55569dfd202c3aedaf787f9 (patch)
tree5b958726180108532bd64c3babc4d213caea7b22
parentda2e8a634f21c417d78a549d873c49ce7e7d1452 (diff)
downloadchromium_src-2c706e549bd27317f55569dfd202c3aedaf787f9.zip
chromium_src-2c706e549bd27317f55569dfd202c3aedaf787f9.tar.gz
chromium_src-2c706e549bd27317f55569dfd202c3aedaf787f9.tar.bz2
Instrumenting Predictor::StartSomeQueuedResolutions and ProfileIOData::Init to find jank.
Prior instrumentations showed: StartSomeQueuedResolutions: 9 jph ProfileIOData::Init: 4.4 BUG=436671 Review URL: https://codereview.chromium.org/796213002 Cr-Commit-Position: refs/heads/master@{#308097}
-rw-r--r--chrome/browser/net/predictor.cc17
-rw-r--r--chrome/browser/profiles/profile_io_data.cc20
2 files changed, 37 insertions, 0 deletions
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index d38bb29..a6a61c6 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -1166,6 +1166,11 @@ void Predictor::StartSomeQueuedResolutions() {
while (!work_queue_.IsEmpty() &&
pending_lookups_.size() < max_concurrent_dns_lookups_) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "436671 Predictor::StartSomeQueuedResolutions1"));
+
const GURL url(work_queue_.Pop());
UrlInfo* info = &results_[url];
DCHECK(info->HasUrl(url));
@@ -1177,7 +1182,19 @@ void Predictor::StartSomeQueuedResolutions() {
}
LookupRequest* request = new LookupRequest(this, host_resolver_, url);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "436671 Predictor::StartSomeQueuedResolutions2"));
+
int status = request->Start();
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "436671 Predictor::StartSomeQueuedResolutions3"));
+
if (status == net::ERR_IO_PENDING) {
// Will complete asynchronously.
pending_lookups_.insert(request);
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 15bf800..50d7970 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -1023,10 +1023,18 @@ void ProfileIOData::Init(
IOThread::Globals* const io_thread_globals = io_thread->globals();
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 ProfileIOData::Init1"));
+
// Create the common request contexts.
main_request_context_.reset(new net::URLRequestContext());
extensions_request_context_.reset(new net::URLRequestContext());
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 ProfileIOData::Init2"));
+
scoped_ptr<ChromeNetworkDelegate> network_delegate(
new ChromeNetworkDelegate(
#if defined(ENABLE_EXTENSIONS)
@@ -1056,6 +1064,10 @@ void ProfileIOData::Init(
new chrome_browser_net::ChromeFraudulentCertificateReporter(
main_request_context_.get()));
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 ProfileIOData::Init3"));
+
// NOTE: Proxy service uses the default io thread network delegate, not the
// delegate just created.
proxy_service_.reset(
@@ -1074,6 +1086,10 @@ void ProfileIOData::Init(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
IsOffTheRecord()));
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile4(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 ProfileIOData::Init4"));
+
// Take ownership over these parameters.
cookie_settings_ = profile_params_->cookie_settings;
host_content_settings_map_ = profile_params_->host_content_settings_map;
@@ -1117,6 +1133,10 @@ void ProfileIOData::Init(
io_thread_globals->cert_verifier.get());
#endif
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
+ tracked_objects::ScopedTracker tracking_profile5(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 ProfileIOData::Init5"));
+
InitializeInternal(
network_delegate.Pass(), profile_params_.get(),
protocol_handlers, request_interceptors.Pass());