Bug 1334218 - Add a profiler annotation to PresShell::Paint that gives the URL of the document being painted; r=dholbert

This essentially copies what we do for the PresShell::DoReflow marker.
This commit is contained in:
Ehsan Akhgari 2017-01-26 14:50:59 -05:00
Родитель 331658bc88
Коммит ec8e7efb36
1 изменённых файлов: 7 добавлений и 3 удалений

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

@ -6312,8 +6312,12 @@ PresShell::Paint(nsView* aViewToPaint,
const nsRegion& aDirtyRegion,
uint32_t aFlags)
{
PROFILER_LABEL("PresShell", "Paint",
js::ProfileEntry::Category::GRAPHICS);
#ifdef MOZ_GECKO_PROFILER
nsIURI* uri = mDocument->GetDocumentURI();
PROFILER_LABEL_PRINTF("PresShell", "Paint",
js::ProfileEntry::Category::GRAPHICS, "(%s)",
uri ? uri->GetSpecOrDefault().get() : "N/A");
#endif
Maybe<js::AutoAssertNoContentJS> nojs;
@ -9120,7 +9124,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
}
#ifdef MOZ_GECKO_PROFILER
nsIURI *uri = mDocument->GetDocumentURI();
nsIURI* uri = mDocument->GetDocumentURI();
PROFILER_LABEL_PRINTF("PresShell", "DoReflow",
js::ProfileEntry::Category::GRAPHICS, "(%s)",
uri ? uri->GetSpecOrDefault().get() : "N/A");