Closed
Bug 681535
Opened 14 years ago
Closed 14 years ago
XUL reflow telemetry
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: taras.mozilla, Assigned: froydnj)
References
Details
Attachments
(1 file, 4 obsolete files)
4.33 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
I would like to measure xul reflow overhead. Unfortunately I don't know how to distinguish xul reflows from html ones. Any suggestions?
![]() |
||
Comment 1•14 years ago
|
||
One simple way is to see whether the root element is in the XUL namespace, right? At least good enough for our purposes.
You shouldn't be instrumenting PresShell::InitialReflow if you want to measure reflow; ProcessReflowCommands is the correct point to instrument. There isn't even any reflow at *all* inside InitialReflow, and hasn't been since bug 378975.
![]() |
Reporter | |
Comment 3•14 years ago
|
||
(In reply to David Baron [:dbaron] from comment #2)
> You shouldn't be instrumenting PresShell::InitialReflow if you want to
> measure reflow; ProcessReflowCommands is the correct point to instrument.
> There isn't even any reflow at *all* inside InitialReflow, and hasn't been
> since bug 378975.
Ok, I still want to have a probe in there to measure *something* xul-ish happening. What should we call it instead?
Initial Frame Construction?
![]() |
Assignee | |
Comment 5•14 years ago
|
||
This patch addresses dbaron's point, I think. I haven't figured out how to address bz's idea of checking the root element; the layout code is opaque to me.
Attachment #555259 -
Attachment is obsolete: true
![]() |
||
Comment 6•14 years ago
|
||
if (mDocument->GetRootElement() && mDocument->GetRootElement()->IsXUL())
(note that you can also check |root->IsXUL()| in InitialReflow, if you move the getting of |root| higher up in the function.
![]() |
Assignee | |
Comment 7•14 years ago
|
||
Updated with checks for XULness. Feeling good enough to ask for review.
Assignee: nobody → nfroyd
Attachment #555822 -
Attachment is obsolete: true
Attachment #556937 -
Flags: review?(dbaron)
![]() |
Reporter | |
Comment 8•14 years ago
|
||
Comment on attachment 556937 [details] [diff] [review]
v3: only accumulate time for XUL reflows
Make sure you .hgrc has something like
[diff]
git = 1
showfunc=true
Use static_cast<>
Attachment #556937 -
Flags: review?(dbaron) → review-
![]() |
Assignee | |
Comment 9•14 years ago
|
||
As Taras pointed out, we should be using static_cast; we should also be accumulating (end-start) durations, not (start-end) durations.
Attachment #556937 -
Attachment is obsolete: true
Attachment #556964 -
Flags: review?
Comment on attachment 556964 [details] [diff] [review]
v4: use static_cast, fix logic thinko
Please use construction-style cast, i.e., PRUint32(foo) rather than static_cast<PRUint32>(foo). r=dbaron with that.
(You've complied and tested this, right?)
Attachment #556964 -
Flags: review? → review+
![]() |
Reporter | |
Comment 11•14 years ago
|
||
(In reply to David Baron [:dbaron] from comment #10)
> Comment on attachment 556964 [details] [diff] [review]
> v4: use static_cast, fix logic thinko
>
> Please use construction-style cast, i.e., PRUint32(foo) rather than
> static_cast<PRUint32>(foo). r=dbaron with that.
David, I've never been asked to use this style of cast before in mozilla. When is constuctor style preferable?
I generally prefer it for primitive types; I think others do too. In all of layout/base I see only one use of static_cast to a primitive type (and I reviewed it, aargh -- though it's in #ifdef'd out code):
nsDisplayList.cpp: printf(" Hit! Time: %f, first frame: %p\n", static_cast<double>(clock()),
![]() |
Assignee | |
Comment 14•14 years ago
|
||
Updated patch with new API usage, proper patch format, etc. Carrying over r+.
Attachment #556964 -
Attachment is obsolete: true
Attachment #567480 -
Flags: review+
![]() |
Assignee | |
Updated•14 years ago
|
Keywords: checkin-needed
Comment 15•14 years ago
|
||
Keywords: checkin-needed
Target Milestone: --- → mozilla10
Updated•14 years ago
|
OS: Linux → All
Hardware: x86 → All
![]() |
||
Comment 16•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
![]() |
||
Comment 17•14 years ago
|
||
The telemetry dashboard for this histogram (XUL_REFLOW_MS) shows all samples at 0. Is this expected because we're waiting for another piece, or is this a bug?
![]() |
||
Comment 18•14 years ago
|
||
This probe measures the time spent in ProcessReflowCommands even in cases when there are no reflow commands to process. The fraction of times when this is true completely swamps all other cases, I bet.
My changes in bug 709256 will make this probe measure something sane, at which point we can see how things look
You need to log in
before you can comment on or make changes to this bug.
Description
•