Bug 1462784 - Annotate idle stacks in the native event loop on Linux. r?froydnj
MozReview-Commit-ID: 3Q2A7ytsn1Y
--- a/widget/gtk/nsAppShell.cpp
+++ b/widget/gtk/nsAppShell.cpp
@@ -44,16 +44,17 @@ static GPollFunc sPollFunc;
// Wrapper function to disable hang monitoring while waiting in poll().
static gint
PollWrapper(GPollFD *ufds, guint nfsd, gint timeout_)
{
mozilla::HangMonitor::Suspend();
gint result;
{
+ AUTO_PROFILER_LABEL("PollWrapper", IDLE);
AUTO_PROFILER_THREAD_SLEEP;
result = (*sPollFunc)(ufds, nfsd, timeout_);
}
mozilla::HangMonitor::NotifyActivity();
return result;
}
#ifdef MOZ_WIDGET_GTK