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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 1532873003: PlzNavigate: add initial traces for new TBM benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index e400ecf3b7f1f92ca1c93e10544d4e846c16d4d9..403f957c0b7fd3974884a9cf7be31792e70849d8 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -288,8 +288,9 @@ bool NavigatorImpl::NavigateToEntry(
// "Open link in new tab"). We need to keep it above RFHM::Navigate() call to
// capture the time needed for the RenderFrameHost initialization.
base::TimeTicks navigation_start = base::TimeTicks::Now();
-
- RenderFrameHostManager* manager = frame_tree_node->render_manager();
+ TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(
+ "navigation", "NavigationTiming navigationStart",
+ TRACE_EVENT_SCOPE_GLOBAL, navigation_start.ToInternalValue());
// PlzNavigate: the RenderFrameHosts are no longer asked to navigate.
if (IsBrowserSideNavigationEnabled()) {
@@ -298,6 +299,18 @@ bool NavigatorImpl::NavigateToEntry(
RequestNavigation(frame_tree_node, dest_url, dest_referrer, frame_entry,
entry, reload_type, is_same_document_history_load,
navigation_start);
+ if (frame_tree_node->IsMainFrame()) {
+ TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1(
clamy 2015/12/18 15:42:11 Maybe add a comment about what the handle and the
carlosk 2015/12/18 17:23:21 Done.
clamy 2015/12/21 10:43:32 I'd rather have the comment all packed together th
carlosk 2015/12/21 11:19:25 Done.
+ "navigation", "Navigation timeToIOStart",
+ frame_tree_node->navigation_request()->navigation_handle(),
+ navigation_start.ToInternalValue(), "FrameTreeNode id",
+ frame_tree_node->frame_tree_node_id());
+ TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1(
+ "navigation", "Navigation timeToCommit",
+ frame_tree_node->navigation_request()->navigation_handle(),
+ navigation_start.ToInternalValue(), "FrameTreeNode id",
+ frame_tree_node->frame_tree_node_id());
+ }
// Notify observers about navigation if this is for the pending entry.
if (delegate_ && is_pending_entry)
@@ -307,7 +320,7 @@ bool NavigatorImpl::NavigateToEntry(
}
RenderFrameHostImpl* dest_render_frame_host =
- manager->Navigate(dest_url, frame_entry, entry);
+ frame_tree_node->render_manager()->Navigate(dest_url, frame_entry, entry);
if (!dest_render_frame_host)
return false; // Unable to create the desired RenderFrameHost.
@@ -495,6 +508,12 @@ void NavigatorImpl::DidNavigate(
// Keep track of each frame's URL in its FrameTreeNode.
render_frame_host->frame_tree_node()->SetCurrentURL(params.url);
+ if (did_navigate && render_frame_host->frame_tree_node()->IsMainFrame() &&
+ IsBrowserSideNavigationEnabled()) {
+ TRACE_EVENT_ASYNC_END0("navigation", "Navigation timeToCommit",
+ render_frame_host->navigation_handle());
+ }
+
// Send notification about committed provisional loads. This notification is
// different from the NAV_ENTRY_COMMITTED notification which doesn't include
// the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations.

Powered by Google App Engine
This is Rietveld 408576698