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

Issue 1390053002: Trace FrameTreeNode Snapshots (Closed)

Created:
5 years, 2 months ago by benjhayden
Modified:
4 years, 9 months ago
Reviewers:
clamy, Sami, nasko
CC:
carlosk, chromium-reviews, creis+watch_chromium.org, Charlie Harrison, darin-cc_chromium.org, jam, lpy, nasko+codewatch_chromium.org, nduca
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Trace FrameTreeNode Snapshots This will provide a single ground-truth for frame structure in tracing. FrameTreeNodes are snapshot when they are created or destroyed, when tracing starts, and when a frame's url changes. Each snapshot contains the frame's url, a reference to its parent (unless it's a root), and a cross-process scoped reference to the current RenderFrame. The snapshots are traced at their frame_tree_node_id, not their memory address. The RenderFrames are traced at their routing_ids, not their memory address, so that FrameTreeNodes can use cross-process references to them. Pending and speculative RenderFrames are not supported. If a specific use case is found for them, then cross-process scoped references will be added to TracedFrameTreeNode for them. The RenderFrame references will allow correlating frame tree structure and FrameTreeNode objects with LocalFrame Trace Contexts. The data for each FrameTreeNode is copied to a TracedFrameTreeNode when the snapshot is recorded, not when the trace is dumped to JSON, because the underlying FrameTree might change between when the snapshot is recorded and when the trace is dumped to JSON. RenderFrames and FrameTreeNodes are snapshot when they are created so that there's always a snapshot for the tracing model to find when it patches up the references. The catapult side of this change is https://codereview.chromium.org/1736373002 The RenderFrame object snapshots that are referenced by the FrameTreeNode snapshots are in Sami's Frameblamr CL: https://codereview.chromium.org/1447563002/ BUG=537802 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/ff37bf3297e8cbe14c6a865e528673f0814c7da1 Cr-Commit-Position: refs/heads/master@{#379623}

Patch Set 1 : #

Total comments: 14

Patch Set 2 : comments #

Patch Set 3 : comments #

Patch Set 4 : comments #

Total comments: 12

Patch Set 5 : TracedFrameTreeNode #

Patch Set 6 : ScopedVector<scoped_refptr> #

Patch Set 7 : DidNavigate #

Patch Set 8 : non-copied FrameTree #

Total comments: 6

Patch Set 9 : rewrite #

Patch Set 10 : rebase #

Patch Set 11 : RenderFrameHostManager::CommitPendingIfNecessary #

Patch Set 12 : processId, routingId, children #

Patch Set 13 : TraceSnapshot only in FrameTree #

Total comments: 3

Patch Set 14 : TracedFrameTreeNode #

Patch Set 15 : . #

Patch Set 16 : . #

Patch Set 17 : rebase #

Patch Set 18 : scoped_ptr #

Total comments: 14

Patch Set 19 : comments #

Patch Set 20 : comments #

Patch Set 21 : GetProcId windows handle #

Total comments: 2

Patch Set 22 : fix segfaults #

Total comments: 3

Patch Set 23 : fix windows #

Patch Set 24 : fix posix #

Patch Set 25 : Process(rph.GetHandle()) is broken, using GetProcId #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -2 lines) Patch
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +9 lines, -2 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +26 lines, -0 lines 0 comments Download
A content/browser/frame_host/traced_frame_tree_node.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +36 lines, -0 lines 0 comments Download
A content/browser/frame_host/traced_frame_tree_node.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +76 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 93 (40 generated)
benjhayden
I'll send this to an owner for full review if you confirm that it's part ...
5 years, 2 months ago (2015-10-07 17:38:33 UTC) #4
benjhayden
PTAL, clamy@ for ownership, and nasko@ for tracing context, though it says he might be ...
5 years, 2 months ago (2015-10-09 23:15:08 UTC) #8
clamy
Thanks! Could you add a link to a bug in your CL description? Also, IIUC, ...
5 years, 2 months ago (2015-10-12 09:31:06 UTC) #9
benjhayden
Is this the right way to trace the pending/speculative frame hosts? Is this the right ...
5 years, 2 months ago (2015-10-13 00:22:21 UTC) #10
clamy
Thanks! A few comments on tracing the pending/speculative RFH. Alos, if you remove the # ...
5 years, 2 months ago (2015-10-13 11:48:17 UTC) #11
nasko
https://codereview.chromium.org/1390053002/diff/140001/content/browser/frame_host/traced_frame_tree.cc File content/browser/frame_host/traced_frame_tree.cc (right): https://codereview.chromium.org/1390053002/diff/140001/content/browser/frame_host/traced_frame_tree.cc#newcode17 content/browser/frame_host/traced_frame_tree.cc:17: value->SetInteger("ftid", node.frame_tree_node_id()); nit: "ftnid", since this is a node, ...
5 years, 2 months ago (2015-10-13 23:01:56 UTC) #12
benjhayden
Apologies for the delay, I'm back from a brief paternity leave. Thanks for your comments! ...
5 years, 2 months ago (2015-10-22 17:24:21 UTC) #14
nasko
https://codereview.chromium.org/1390053002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1390053002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc#newcode925 content/browser/frame_host/render_frame_host_impl.cc:925: frame_tree_->TraceSnapshot(); On 2015/10/22 17:24:21, benjhayden_chromium wrote: > On 2015/10/13 ...
5 years, 2 months ago (2015-10-23 15:52:04 UTC) #15
benjhayden
https://codereview.chromium.org/1390053002/diff/140001/content/browser/frame_host/traced_frame_tree.cc File content/browser/frame_host/traced_frame_tree.cc (right): https://codereview.chromium.org/1390053002/diff/140001/content/browser/frame_host/traced_frame_tree.cc#newcode45 content/browser/frame_host/traced_frame_tree.cc:45: : value_(GetFrameTreeNodeAsValue(*tree.root())) { On 2015/10/23 at 15:52:04, nasko (slow ...
5 years, 2 months ago (2015-10-23 20:31:33 UTC) #16
clamy
Thanks! https://codereview.chromium.org/1390053002/diff/220001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/1390053002/diff/220001/content/browser/frame_host/navigator_impl.cc#newcode497 content/browser/frame_host/navigator_impl.cc:497: render_frame_host->frame_tree_node()->frame_tree()->TraceSnapshot(); I think this should move to RenderFrameHostManager::CommitPendingIfNecessary ...
5 years, 1 month ago (2015-10-26 14:45:13 UTC) #17
nasko
The tracer code structure looks good now, but I do have some extra comments. https://codereview.chromium.org/1390053002/diff/220001/content/browser/frame_host/navigator_impl.cc ...
5 years, 1 month ago (2015-10-26 15:59:23 UTC) #18
clamy
https://codereview.chromium.org/1390053002/diff/220001/content/browser/frame_host/traced_frame_tree.cc File content/browser/frame_host/traced_frame_tree.cc (right): https://codereview.chromium.org/1390053002/diff/220001/content/browser/frame_host/traced_frame_tree.cc#newcode29 content/browser/frame_host/traced_frame_tree.cc:29: if (base::CommandLine::ForCurrentProcess()->HasSwitch( On 2015/10/26 15:59:23, nasko (slow to review) ...
5 years, 1 month ago (2015-10-26 17:54:03 UTC) #19
benjhayden
On 2015/10/26 at 17:54:03, clamy wrote: > https://codereview.chromium.org/1390053002/diff/220001/content/browser/frame_host/traced_frame_tree.cc > File content/browser/frame_host/traced_frame_tree.cc (right): > > https://codereview.chromium.org/1390053002/diff/220001/content/browser/frame_host/traced_frame_tree.cc#newcode29 ...
5 years, 1 month ago (2015-10-28 17:05:39 UTC) #22
benjhayden
PTAL Now that pending/speculative frame host ids are not traced, are there any TraceSnapshot() calls ...
5 years, 1 month ago (2015-10-28 20:06:15 UTC) #25
nasko
The CL description can be fixed here and there, but nothing too big. The one ...
5 years, 1 month ago (2015-10-28 20:17:55 UTC) #26
benjhayden
Removed the confusing sentence. Thanks! https://codereview.chromium.org/1390053002/diff/320001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/1390053002/diff/320001/content/browser/frame_host/frame_tree_node.cc#newcode195 content/browser/frame_host/frame_tree_node.cc:195: frame_tree_->TraceSnapshot(); On 2015/10/28 at ...
5 years, 1 month ago (2015-10-28 20:50:50 UTC) #28
benjhayden
Camille?
5 years, 1 month ago (2015-10-29 17:04:17 UTC) #29
clamy
Thnaks! Lgtm with one comment. https://codereview.chromium.org/1390053002/diff/320001/content/browser/frame_host/traced_frame_tree.cc File content/browser/frame_host/traced_frame_tree.cc (right): https://codereview.chromium.org/1390053002/diff/320001/content/browser/frame_host/traced_frame_tree.cc#newcode23 content/browser/frame_host/traced_frame_tree.cc:23: if (current_frame_host) { We ...
5 years, 1 month ago (2015-10-29 17:17:16 UTC) #30
nasko
Is this going to land at some point?
5 years ago (2015-12-14 17:13:01 UTC) #31
benjhayden
On 2015/12/14 at 17:13:01, nasko wrote: > Is this going to land at some point? ...
5 years ago (2015-12-14 18:19:08 UTC) #32
nasko
On 2015/12/14 18:19:08, benjhayden_chromium wrote: > On 2015/12/14 at 17:13:01, nasko wrote: > > Is ...
5 years ago (2015-12-15 17:01:35 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/340001
4 years, 10 months ago (2016-02-20 00:06:00 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-20 02:08:10 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/380001
4 years, 10 months ago (2016-02-26 22:03:08 UTC) #46
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/137247) ios_rel_device_ninja on ...
4 years, 10 months ago (2016-02-26 22:07:10 UTC) #48
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/400001
4 years, 9 months ago (2016-03-01 22:03:52 UTC) #52
benjhayden
PTAL! Apologies for the long delay. I had to rewrite this CL, but I think ...
4 years, 9 months ago (2016-03-01 22:06:45 UTC) #53
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/29679) mac_chromium_compile_dbg_ng on ...
4 years, 9 months ago (2016-03-01 22:16:06 UTC) #55
nasko
A few minor things. https://codereview.chromium.org/1390053002/diff/420001/content/browser/frame_host/traced_frame_tree_node.cc File content/browser/frame_host/traced_frame_tree_node.cc (right): https://codereview.chromium.org/1390053002/diff/420001/content/browser/frame_host/traced_frame_tree_node.cc#newcode1 content/browser/frame_host/traced_frame_tree_node.cc:1: // Copyright 2015 The Chromium ...
4 years, 9 months ago (2016-03-02 00:20:20 UTC) #56
Sami
https://codereview.chromium.org/1390053002/diff/420001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/1390053002/diff/420001/content/browser/frame_host/frame_tree_node.cc#newcode192 content/browser/frame_host/frame_tree_node.cc:192: TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( Should we move this to a helper method ...
4 years, 9 months ago (2016-03-02 00:29:01 UTC) #57
benjhayden
Thanks! PTAL. https://codereview.chromium.org/1390053002/diff/420001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/1390053002/diff/420001/content/browser/frame_host/frame_tree_node.cc#newcode192 content/browser/frame_host/frame_tree_node.cc:192: TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( On 2016/03/02 at 00:29:01, Sami (slow ...
4 years, 9 months ago (2016-03-02 18:53:04 UTC) #59
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/460001
4 years, 9 months ago (2016-03-02 18:53:09 UTC) #60
nasko
LGTM
4 years, 9 months ago (2016-03-02 19:25:46 UTC) #61
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/111915)
4 years, 9 months ago (2016-03-02 19:26:15 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/480001
4 years, 9 months ago (2016-03-03 00:19:44 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/177075)
4 years, 9 months ago (2016-03-03 01:20:46 UTC) #68
nasko
https://codereview.chromium.org/1390053002/diff/480001/content/browser/frame_host/traced_frame_tree_node.cc File content/browser/frame_host/traced_frame_tree_node.cc (right): https://codereview.chromium.org/1390053002/diff/480001/content/browser/frame_host/traced_frame_tree_node.cc#newcode26 content/browser/frame_host/traced_frame_tree_node.cc:26: process_id_ = base::GetProcId(current_frame_host->GetProcess()->GetHandle()); Why are you using GetProcId? It ...
4 years, 9 months ago (2016-03-03 19:03:51 UTC) #69
benjhayden
Updated to base::Process::Pid(). I also had to add some branches back in order to fix ...
4 years, 9 months ago (2016-03-03 20:35:43 UTC) #70
nasko
https://codereview.chromium.org/1390053002/diff/500001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/1390053002/diff/500001/content/browser/frame_host/frame_tree_node.cc#newcode113 content/browser/frame_host/frame_tree_node.cc:113: TraceSnapshot(); Is this call to TraceSnapshot() really needed? As ...
4 years, 9 months ago (2016-03-03 21:41:32 UTC) #71
benjhayden
https://codereview.chromium.org/1390053002/diff/500001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/1390053002/diff/500001/content/browser/frame_host/frame_tree_node.cc#newcode113 content/browser/frame_host/frame_tree_node.cc:113: TraceSnapshot(); On 2016/03/03 at 21:41:32, nasko wrote: > Is ...
4 years, 9 months ago (2016-03-03 23:14:06 UTC) #72
nasko
On 2016/03/03 23:14:06, benjhayden_chromium wrote: > https://codereview.chromium.org/1390053002/diff/500001/content/browser/frame_host/frame_tree_node.cc > File content/browser/frame_host/frame_tree_node.cc (right): > > https://codereview.chromium.org/1390053002/diff/500001/content/browser/frame_host/frame_tree_node.cc#newcode113 > ...
4 years, 9 months ago (2016-03-03 23:18:56 UTC) #73
benjhayden
On 2016/03/03 at 23:18:56, nasko wrote: > On 2016/03/03 23:14:06, benjhayden_chromium wrote: > > https://codereview.chromium.org/1390053002/diff/500001/content/browser/frame_host/frame_tree_node.cc ...
4 years, 9 months ago (2016-03-04 01:06:22 UTC) #74
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/500001
4 years, 9 months ago (2016-03-04 01:07:48 UTC) #76
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/112792)
4 years, 9 months ago (2016-03-04 01:56:47 UTC) #78
benjhayden
I'll figure out what to do about this latest windows failure tomorrow unless anybody has ...
4 years, 9 months ago (2016-03-04 02:01:08 UTC) #79
benjhayden
On 2016/03/04 at 02:01:08, benjhayden_chromium wrote: > I'll figure out what to do about this ...
4 years, 9 months ago (2016-03-05 01:26:36 UTC) #80
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/540001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/540001
4 years, 9 months ago (2016-03-05 01:26:57 UTC) #83
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/113416)
4 years, 9 months ago (2016-03-05 02:43:25 UTC) #85
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390053002/560001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390053002/560001
4 years, 9 months ago (2016-03-07 18:26:17 UTC) #88
commit-bot: I haz the power
Committed patchset #25 (id:560001)
4 years, 9 months ago (2016-03-07 20:14:22 UTC) #89
commit-bot: I haz the power
Patchset 25 (id:??) landed as https://crrev.com/ff37bf3297e8cbe14c6a865e528673f0814c7da1 Cr-Commit-Position: refs/heads/master@{#379623}
4 years, 9 months ago (2016-03-07 20:16:40 UTC) #91
benwells
A revert of this CL (patchset #25 id:560001) has been created in https://codereview.chromium.org/1774853003/ by benwells@chromium.org. ...
4 years, 9 months ago (2016-03-08 04:42:11 UTC) #92
benjhayden
4 years, 9 months ago (2016-03-08 20:54:30 UTC) #93
Message was sent while issue was closed.
Thanks! Relanding in https://codereview.chromium.org/1775953003

Powered by Google App Engine
This is Rietveld 408576698