Closed Bug 1463408 Opened 4 years ago Closed 4 years ago

Allow profiler to disable parallel traversal of stylo

Categories

(Core :: Gecko Profiler, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(2 files)

That would make it clearer what's going on inside the restyle phase.

It seems we can easily disable that via ServoStyleSet::ShouldTraverseInParallel(). We need to add a runtime switch somewhere, and have Gecko Profiler add a new checkbox for this.
Assignee: nobody → xidorn+moz
The change to addon is on devtools-html/Gecko-Profiler-Addon#118.
Comment on attachment 8979879 [details]
Bug 1463408 part 2 - Add profiler feature seqstyle for forcing sequential styling when profiling.

https://reviewboard.mozilla.org/r/246072/#review252202

::: layout/style/ServoStyleSet.cpp:1521
(Diff revision 1)
>    MOZ_ASSERT(mDocument->GetShell(), "Styling a document without a shell?");
> -  return mDocument->GetShell()->IsActive();
> +  if (!mDocument->GetShell()->IsActive()) {
> +    return false;
> +  }
> +#ifdef MOZ_GECKO_PROFILER
> +  if (profiler_feature_active(ProfilerFeature::SequentialStyle)) {

I'm slightly disappointed this add a function call and a sequentially-consistent operation in this function, but it's fine I think, it's not the hottest code in the world :).
Attachment #8979879 - Flags: review?(emilio) → review+
Comment on attachment 8979878 [details]
Bug 1463408 part 1 - Remove unused restyle profiler feature.

https://reviewboard.mozilla.org/r/246070/#review252320

Thanks for taking care of bug 1452753 :)
Attachment #8979878 - Flags: review?(mstange) → review+
Comment on attachment 8979879 [details]
Bug 1463408 part 2 - Add profiler feature seqstyle for forcing sequential styling when profiling.

https://reviewboard.mozilla.org/r/246072/#review252324
Attachment #8979879 - Flags: review?(mstange) → review+
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d3f94ce4109
part 1 - Remove unused restyle profiler feature. r=mstange
https://hg.mozilla.org/integration/autoland/rev/e0c02a6f05dd
part 2 - Add profiler feature seqstyle for forcing sequential styling when profiling. r=emilio,mstange
https://hg.mozilla.org/mozilla-central/rev/7d3f94ce4109
https://hg.mozilla.org/mozilla-central/rev/e0c02a6f05dd
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Duplicate of this bug: 1452753
You need to log in before you can comment on or make changes to this bug.