Bug 1354255 - Remove ElementRestyler::ComputeStyleChangeFor profiler instrumentation due to overhead. r=Ehsan

This only has overhead if the profiler is running, but it means that it has
the potential to skew restyle times in profiles.
We haven't measured the overhead of this, but it's probably non-zero, and at
the moment our profiling efforts are more focused on getting accurate times
than on getting useful information about restyling cost sources.

MozReview-Commit-ID: 3KmiiyGrxZH

--HG--
extra : rebase_source : df7047f1af5f36f7a1b3a18498d8eb5508ee0b93
This commit is contained in:
Markus Stange 2017-04-06 17:20:40 -04:00
Родитель 782bf7c317
Коммит 6bc4c8de32
1 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -3055,15 +3055,10 @@ ElementRestyler::ComputeStyleChangeFor(nsIFrame* aFrame,
nsTArray<RefPtr<nsStyleContext>>&
aSwappedStructOwners)
{
nsIContent* content = aFrame->GetContent();
std::string elemDesc;
if (profiler_is_active() && content) {
elemDesc = ToString(*content);
}
PROFILER_LABEL("ElementRestyler", "ComputeStyleChangeFor",
js::ProfileEntry::Category::CSS);
PROFILER_LABEL_DYNAMIC("ElementRestyler", "ComputeStyleChangeFor",
js::ProfileEntry::Category::CSS,
content ? elemDesc.c_str() : "<unknown>");
nsIContent* content = aFrame->GetContent();
if (aMinChange) {
aChangeList->AppendChange(aFrame, content, aMinChange);
}