From ff1e37d73d4e54553cc0f9505d283c9de8596545 Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Mon, 16 Apr 2012 15:07:56 -0400 Subject: [PATCH] Bug 745864 - Add profiling labels relevant for Fennec event performance. r=bgirard a=blassey --HG-- extra : rebase_source : e4ba8a8b6f4bdad1dcd6fe076e3262a6e07aeba2 --- widget/android/nsAppShell.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/widget/android/nsAppShell.cpp b/widget/android/nsAppShell.cpp index 78c034ff808..823aa409f1e 100644 --- a/widget/android/nsAppShell.cpp +++ b/widget/android/nsAppShell.cpp @@ -63,6 +63,7 @@ #include "mozilla/dom/ScreenOrientation.h" +#include "sampler.h" #ifdef MOZ_ANDROID_HISTORY #include "nsAndroidHistory.h" #endif @@ -220,18 +221,19 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait) { EVLOG("nsAppShell::ProcessNextNativeEvent %d", mayWait); + SAMPLE_LABEL("nsAppShell", "ProcessNextNativeEvent"); nsAutoPtr curEvent; { MutexAutoLock lock(mCondLock); curEvent = PopNextEvent(); if (!curEvent && mayWait) { + SAMPLE_LABEL("nsAppShell::ProcessNextNativeEvent", "Wait"); // hmm, should we really hardcode this 10s? #if defined(DEBUG_ANDROID_EVENTS) PRTime t0, t1; EVLOG("nsAppShell: waiting on mQueueCond"); t0 = PR_Now(); - mQueueCond.Wait(PR_MillisecondsToInterval(10000)); t1 = PR_Now(); EVLOG("nsAppShell: wait done, waited %d ms", (int)(t1-t0)/1000);