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

Issue 2028523002: Attribute Stuff to Frames with FrameBlamer (Closed)

Created:
4 years, 6 months ago by Xiaocheng
Modified:
4 years, 6 months ago
Reviewers:
haraken, tkent, Sami, yhirano
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, eakuefner, fmeawad, nednguyen
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Attribute Stuff to Frames with FrameBlamer This patch attributes the cost of the following functions to individual frames: - FrameView::updateStyleAndLayoutIfNeededRecursiveInternal - PageAnimator::serviceScriptedAnimations - V8ScriptRunner::callFunction The above attribution is built on a new helper class ScopedFrameBlamer, a wrapper of a LocalFrame's frame blame context, for automatically calling the blame context's Enter() and Leave() functions when we enter/exit a scope. Design doc: https://docs.google.com/document/d/15BB-suCb9j-nFt55yCFJBJCGzLg2qUm3WaSOPb8APtI/edit?usp=sharing BUG=546021 Committed: https://crrev.com/bb41bc42d96c37688310a8e8afe9d92960d53a25 Cr-Commit-Position: refs/heads/master@{#397984}

Patch Set 1 #

Patch Set 2 : Bug fix #

Patch Set 3 : UTC201606010826 #

Total comments: 8

Patch Set 4 : Add documentation #

Patch Set 5 : Check existence of BlameContext before using it #

Total comments: 1

Patch Set 6 : Bug fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -0 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/PageAnimator.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (14 generated)
Xiaocheng
PTAL. Should I break this patch into 4 smaller ones (the helper class and its ...
4 years, 6 months ago (2016-06-01 09:47:59 UTC) #6
Sami
lgtm. This doesn't seem too large to me to land in one go. https://codereview.chromium.org/2028523002/diff/40001/third_party/WebKit/Source/core/frame/LocalFrame.h File ...
4 years, 6 months ago (2016-06-01 11:05:17 UTC) #7
yhirano
https://codereview.chromium.org/2028523002/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp File third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp (right): https://codereview.chromium.org/2028523002/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp#newcode448 third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp:448: ScopedFrameBlamer frameBlamer(context->isDocument() ? toDocument(context)->frame() : nullptr); Do you want ...
4 years, 6 months ago (2016-06-01 12:26:05 UTC) #8
tkent
https://codereview.chromium.org/2028523002/diff/40001/third_party/WebKit/Source/core/frame/LocalFrame.h File third_party/WebKit/Source/core/frame/LocalFrame.h (right): https://codereview.chromium.org/2028523002/diff/40001/third_party/WebKit/Source/core/frame/LocalFrame.h#newcode318 third_party/WebKit/Source/core/frame/LocalFrame.h:318: class ScopedFrameBlamer { Please add a comment that what ...
4 years, 6 months ago (2016-06-01 23:14:56 UTC) #9
Xiaocheng
Thanks for the review. There is a concern that can |m_frameBlameContext| get deleted when a ...
4 years, 6 months ago (2016-06-02 03:17:20 UTC) #10
Xiaocheng
(Please ignore the previous message...) Thanks for the review. There is a concern that can ...
4 years, 6 months ago (2016-06-02 03:30:59 UTC) #11
tkent
On 2016/06/02 at 03:30:59, xiaochengh wrote: > (Please ignore the previous message...) > > Thanks ...
4 years, 6 months ago (2016-06-02 03:37:51 UTC) #12
Xiaocheng
On 2016/06/02 at 03:37:51, tkent wrote: > On 2016/06/02 at 03:30:59, xiaochengh wrote: > > ...
4 years, 6 months ago (2016-06-02 05:00:29 UTC) #13
tkent
> Still, can I assume that no frame can be detached in FrameView::updateStyleAndLayoutIfNeededRecursiveInternal or PageAnimator::serviceScriptedAnimations? ...
4 years, 6 months ago (2016-06-02 06:30:46 UTC) #14
Xiaocheng
Some thoughts on using FrameBlameContext in Blink. Maybe we should let LocalFrame store and own ...
4 years, 6 months ago (2016-06-02 08:58:11 UTC) #15
Sami
On 2016/06/02 08:58:11, Xiaocheng wrote: > Some thoughts on using FrameBlameContext in Blink. Maybe we ...
4 years, 6 months ago (2016-06-02 09:39:38 UTC) #16
Xiaocheng
On 2016/06/02 at 09:39:38, skyostil wrote: > On 2016/06/02 08:58:11, Xiaocheng wrote: > > Some ...
4 years, 6 months ago (2016-06-02 13:20:46 UTC) #17
yhirano
Holding LocalFame sounds natural to me, but you are thinking that it's too expensive, right?
4 years, 6 months ago (2016-06-02 13:30:45 UTC) #18
Xiaocheng
On 2016/06/02 at 13:30:45, yhirano wrote: > Holding LocalFame sounds natural to me, but you ...
4 years, 6 months ago (2016-06-02 13:45:37 UTC) #19
yhirano
+haraken@ as an oilpan expert
4 years, 6 months ago (2016-06-02 13:49:10 UTC) #21
Sami
On 2016/06/02 13:20:46, Xiaocheng wrote: > The problem is that we must call BlameContext::Leave() at ...
4 years, 6 months ago (2016-06-02 15:15:00 UTC) #22
benjhayden
+Fadi FYI
4 years, 6 months ago (2016-06-02 19:14:26 UTC) #24
benjhayden
+Ned, Ethan FYI
4 years, 6 months ago (2016-06-02 20:24:17 UTC) #27
tkent
IMO, we should remove WebFrameClient::frameBlameContext, and should have WebFrameClient::enterBlameContext() and leaveBlameContext() to avoid to handle ...
4 years, 6 months ago (2016-06-02 21:59:19 UTC) #29
haraken
m_frameBlameContext already has a pointer to the Frame, which will keep the Frame alive, right? ...
4 years, 6 months ago (2016-06-03 00:16:39 UTC) #30
Xiaocheng
Thanks for the comments. I think I have identified the core problem, so let me ...
4 years, 6 months ago (2016-06-03 03:22:18 UTC) #31
Sami
On 2016/06/03 03:22:18, Xiaocheng wrote: > Thanks for the comments. > > I think I ...
4 years, 6 months ago (2016-06-03 11:33:47 UTC) #32
Xiaocheng
PTAL at Patch 5, which keeps a reference to the LocalFrame, and uses the BlameContext ...
4 years, 6 months ago (2016-06-03 15:31:40 UTC) #33
Sami
Thanks, lgtm.
4 years, 6 months ago (2016-06-03 15:57:17 UTC) #34
haraken
bindings/ LGTM https://codereview.chromium.org/2028523002/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp File third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp (right): https://codereview.chromium.org/2028523002/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp#newcode448 third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp:448: ScopedFrameBlamer frameBlamer(context->isDocument() ? toDocument(context)->frame() : nullptr); I ...
4 years, 6 months ago (2016-06-03 23:24:06 UTC) #35
tkent
lgtm
4 years, 6 months ago (2016-06-05 21:38:47 UTC) #37
Xiaocheng
Thanks for all the comments. I'll commit Patch 6 which has an extra nullptr check ...
4 years, 6 months ago (2016-06-06 01:49:16 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028523002/100001
4 years, 6 months ago (2016-06-06 01:49:24 UTC) #41
yhirano
lgtm
4 years, 6 months ago (2016-06-06 04:16:22 UTC) #42
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 6 months ago (2016-06-06 06:30:04 UTC) #43
commit-bot: I haz the power
4 years, 6 months ago (2016-06-06 06:31:12 UTC) #45
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/bb41bc42d96c37688310a8e8afe9d92960d53a25
Cr-Commit-Position: refs/heads/master@{#397984}

Powered by Google App Engine
This is Rietveld 408576698