Bug 745864 - Add profiling labels relevant for Fennec event performance. r=bgirard a=blassey

--HG--
extra : rebase_source : e4ba8a8b6f4bdad1dcd6fe076e3262a6e07aeba2
This commit is contained in:
Jeff Muizelaar 2012-04-16 15:07:56 -04:00
Родитель ee5416ac6c
Коммит ff1e37d73d
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -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<AndroidGeckoEvent> 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);