Commit 7d4ed459 authored by Charles Harrison's avatar Charles Harrison Committed by Commit Bot

Add trace for synchronous time spent in WillStartRequest

I've noticed that these can be a bit slow, but the async traces make
analysis pretty confusing, due to the linked bug.

Bug: 783327
Change-Id: I4d46d715d08ed176bec85b0672b24aab2e2b0022
Reviewed-on: https://chromium-review.googlesource.com/810927Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522433}
parent eeffe2ed
......@@ -926,6 +926,8 @@ NavigationHandleImpl::CheckWillStartRequest() {
DCHECK(state_ != DEFERRING_START || next_index_ != 0);
base::WeakPtr<NavigationHandleImpl> weak_ref = weak_factory_.GetWeakPtr();
for (size_t i = next_index_; i < throttles_.size(); ++i) {
TRACE_EVENT1("navigation", "NavigationThrottle::WillStartRequest",
"throttle", throttles_[i]->GetNameForLogging());
NavigationThrottle::ThrottleCheckResult result =
throttles_[i]->WillStartRequest();
if (!weak_ref) {
......@@ -933,6 +935,9 @@ NavigationHandleImpl::CheckWillStartRequest() {
// Return immediately.
return NavigationThrottle::DEFER;
}
// TODO(csharrison): It would be nice if the Check* traces also included
// synchronous time in the throttle's respective method, and did not include
// time spent in the next throttle's method.
TRACE_EVENT_ASYNC_STEP_INTO0(
"navigation", "NavigationHandle", this,
base::StringPrintf("CheckWillStartRequest: %s: %d",
......
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