summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmenke <mmenke@chromium.org>2015-04-23 13:56:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-23 20:57:27 +0000
commit833437df7079a8a1670c5bff5f93e40e8b238ea0 (patch)
tree68c10fb5c4e6343ba81f96af5713616d73e4b181
parent79f33c3fab9db0b2db10f13c0daaf96a3a9ff5fb (diff)
downloadchromium_src-833437df7079a8a1670c5bff5f93e40e8b238ea0.zip
chromium_src-833437df7079a8a1670c5bff5f93e40e8b238ea0.tar.gz
chromium_src-833437df7079a8a1670c5bff5f93e40e8b238ea0.tar.bz2
Add some instrumentation for jank in URLRequest::Start.
Suspect we'll find the jank is pretty spread out, but could be something actionable. BUG=456327 Review URL: https://codereview.chromium.org/1102473005 Cr-Commit-Position: refs/heads/master@{#326639}
-rw-r--r--net/url_request/url_request.cc8
-rw-r--r--net/url_request/url_request_http_job.cc14
2 files changed, 22 insertions, 0 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index d78412a..6032c4c 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -516,6 +516,10 @@ void URLRequest::Start() {
return;
}
+ // TODO(mmenke): Remove ScopedTracker below once crbug.com/456327 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("456327 URLRequest::Start 2"));
+
StartJob(URLRequestJobManager::GetInstance()->CreateJob(
this, network_delegate_));
}
@@ -589,6 +593,10 @@ void URLRequest::BeforeRequestComplete(int error) {
}
void URLRequest::StartJob(URLRequestJob* job) {
+ // TODO(mmenke): Remove ScopedTracker below once crbug.com/456327 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("456327 URLRequest::StartJob"));
+
DCHECK(!is_pending_);
DCHECK(!job_.get());
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 88b6a477..114a8bd 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -225,6 +225,10 @@ void URLRequestHttpJob::SetPriority(RequestPriority priority) {
}
void URLRequestHttpJob::Start() {
+ // TODO(mmenke): Remove ScopedTracker below once crbug.com/456327 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("456327 URLRequestHttpJob::Start"));
+
DCHECK(!transaction_.get());
// URLRequest::SetReferrer ensures that we do not send username and password
@@ -398,6 +402,11 @@ void URLRequestHttpJob::DestroyTransaction() {
}
void URLRequestHttpJob::StartTransaction() {
+ // TODO(mmenke): Remove ScopedTracker below once crbug.com/456327 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "456327 URLRequestHttpJob::StartTransaction"));
+
if (network_delegate()) {
OnCallToDelegate();
int rv = network_delegate()->NotifyBeforeSendHeaders(
@@ -421,6 +430,11 @@ void URLRequestHttpJob::NotifyBeforeSendHeadersCallback(int result) {
}
void URLRequestHttpJob::MaybeStartTransactionInternal(int result) {
+ // TODO(mmenke): Remove ScopedTracker below once crbug.com/456327 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "456327 URLRequestHttpJob::MaybeStartTransactionInternal"));
+
OnCallToDelegateComplete();
if (result == OK) {
StartTransactionInternal();