Closed Bug 1777473 Opened 2 years ago Closed 2 years ago

Expose some more layout frame labels to javascript developers

Categories

(Core :: Gecko Profiler, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: julienw, Assigned: julienw)

Details

Attachments

(2 files)

I noticed that some layout frame labels were not exposed to JS developers. I missed them while working on bug 1752861.

In my current patches I changed one occurrence of LAYOUT_StyleComputation and one of LAYOUT_CSSParsing.

I also see a non-relevant for JS LAYOUT_FrameConstruction in:
https://searchfox.org/mozilla-central/source/layout/base/nsCSSFrameConstructor.cpp#7009-7010

But I'm not sure how to change the name to make it web-developer friendly. I'm not sure this level of details is useful to web developer, but the fact that we're doing layout and seeing this n the call tree probably is. In that case we could add another frame label that could be simply Layout higher in the call chain.

Emilio, by chance, would you have good suggestions?

Flags: needinfo?(emilio)

I also see this one in profiles: https://searchfox.org/mozilla-central/source/layout/base/PresShell.cpp#1194
But I don't know what this does.

(In reply to Julien Wajsberg [:julienw] from comment #1)

In my current patches I changed one occurrence of LAYOUT_StyleComputation and one of LAYOUT_CSSParsing.

I also see a non-relevant for JS LAYOUT_FrameConstruction in:
https://searchfox.org/mozilla-central/source/layout/base/nsCSSFrameConstructor.cpp#7009-7010

But I'm not sure how to change the name to make it web-developer friendly. I'm not sure this level of details is useful to web developer, but the fact that we're doing layout and seeing this n the call tree probably is. In that case we could add another frame label that could be simply Layout higher in the call chain.

Emilio, by chance, would you have good suggestions?

Ah, maybe nsContentSink::StartLayout (https://searchfox.org/mozilla-central/source/dom/base/nsContentSink.cpp#520-522)
could be replaced by just Layout and make it Relevant for JS.

Here is a profile I try to make better: https://share.firefox.dev/3AcAf8s

(In reply to Julien Wajsberg [:julienw] from comment #2)

I also see this one in profiles: https://searchfox.org/mozilla-central/source/layout/base/PresShell.cpp#1194
But I don't know what this does.

Could the label frame PresShell::Destroy be replaced by LAYOUT_Cleanup (new sub-category to be created)?

Attachment #9283657 - Attachment description: WIP: Bug 1777473 - Expose some more layout frame labels to javascript developers r=emilio → Bug 1777473 - Expose some more layout frame labels to javascript developers r=emilio

The existing frame label was reusing the function name, but we already
have it when using native stacks. Renaming it to a more understandable
name should make it easier for our javascript developers users without
impairing gecko developers.

Depends on D150757

Sorry for the lag, I was on PTO. Frame construction == "layout box construction" maybe? Anyways will look at the patch asap.

Flags: needinfo?(emilio)
Pushed by jwajsberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7ed1a7a9d0fa
Expose some more layout frame labels to javascript developers r=emilio
https://hg.mozilla.org/integration/autoland/rev/4e13fa2ff101
Rename the frame label for PresShell::Destroy and expose to javascript developers r=emilio
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: