Commit 2c706e54 authored by vadimt's avatar vadimt Committed by Commit bot

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}
parent da2e8a63
...@@ -1166,6 +1166,11 @@ void Predictor::StartSomeQueuedResolutions() { ...@@ -1166,6 +1166,11 @@ void Predictor::StartSomeQueuedResolutions() {
while (!work_queue_.IsEmpty() && while (!work_queue_.IsEmpty() &&
pending_lookups_.size() < max_concurrent_dns_lookups_) { 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()); const GURL url(work_queue_.Pop());
UrlInfo* info = &results_[url]; UrlInfo* info = &results_[url];
DCHECK(info->HasUrl(url)); DCHECK(info->HasUrl(url));
...@@ -1177,7 +1182,19 @@ void Predictor::StartSomeQueuedResolutions() { ...@@ -1177,7 +1182,19 @@ void Predictor::StartSomeQueuedResolutions() {
} }
LookupRequest* request = new LookupRequest(this, host_resolver_, url); 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(); 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) { if (status == net::ERR_IO_PENDING) {
// Will complete asynchronously. // Will complete asynchronously.
pending_lookups_.insert(request); pending_lookups_.insert(request);
......
...@@ -1023,10 +1023,18 @@ void ProfileIOData::Init( ...@@ -1023,10 +1023,18 @@ void ProfileIOData::Init(
IOThread::Globals* const io_thread_globals = io_thread->globals(); IOThread::Globals* const io_thread_globals = io_thread->globals();
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 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. // Create the common request contexts.
main_request_context_.reset(new net::URLRequestContext()); main_request_context_.reset(new net::URLRequestContext());
extensions_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( scoped_ptr<ChromeNetworkDelegate> network_delegate(
new ChromeNetworkDelegate( new ChromeNetworkDelegate(
#if defined(ENABLE_EXTENSIONS) #if defined(ENABLE_EXTENSIONS)
...@@ -1056,6 +1064,10 @@ void ProfileIOData::Init( ...@@ -1056,6 +1064,10 @@ void ProfileIOData::Init(
new chrome_browser_net::ChromeFraudulentCertificateReporter( new chrome_browser_net::ChromeFraudulentCertificateReporter(
main_request_context_.get())); 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 // NOTE: Proxy service uses the default io thread network delegate, not the
// delegate just created. // delegate just created.
proxy_service_.reset( proxy_service_.reset(
...@@ -1074,6 +1086,10 @@ void ProfileIOData::Init( ...@@ -1074,6 +1086,10 @@ void ProfileIOData::Init(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
IsOffTheRecord())); 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. // Take ownership over these parameters.
cookie_settings_ = profile_params_->cookie_settings; cookie_settings_ = profile_params_->cookie_settings;
host_content_settings_map_ = profile_params_->host_content_settings_map; host_content_settings_map_ = profile_params_->host_content_settings_map;
...@@ -1117,6 +1133,10 @@ void ProfileIOData::Init( ...@@ -1117,6 +1133,10 @@ void ProfileIOData::Init(
io_thread_globals->cert_verifier.get()); io_thread_globals->cert_verifier.get());
#endif #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( InitializeInternal(
network_delegate.Pass(), profile_params_.get(), network_delegate.Pass(), profile_params_.get(),
protocol_handlers, request_interceptors.Pass()); protocol_handlers, request_interceptors.Pass());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment