зеркало из https://github.com/mozilla/pjs.git
Bug 745864 - Add profiling labels relevant for Fennec event performance. r=bgirard a=blassey
--HG-- extra : rebase_source : e4ba8a8b6f4bdad1dcd6fe076e3262a6e07aeba2
This commit is contained in:
Родитель
ee5416ac6c
Коммит
ff1e37d73d
|
@ -63,6 +63,7 @@
|
||||||
|
|
||||||
#include "mozilla/dom/ScreenOrientation.h"
|
#include "mozilla/dom/ScreenOrientation.h"
|
||||||
|
|
||||||
|
#include "sampler.h"
|
||||||
#ifdef MOZ_ANDROID_HISTORY
|
#ifdef MOZ_ANDROID_HISTORY
|
||||||
#include "nsAndroidHistory.h"
|
#include "nsAndroidHistory.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -220,18 +221,19 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
||||||
{
|
{
|
||||||
EVLOG("nsAppShell::ProcessNextNativeEvent %d", mayWait);
|
EVLOG("nsAppShell::ProcessNextNativeEvent %d", mayWait);
|
||||||
|
|
||||||
|
SAMPLE_LABEL("nsAppShell", "ProcessNextNativeEvent");
|
||||||
nsAutoPtr<AndroidGeckoEvent> curEvent;
|
nsAutoPtr<AndroidGeckoEvent> curEvent;
|
||||||
{
|
{
|
||||||
MutexAutoLock lock(mCondLock);
|
MutexAutoLock lock(mCondLock);
|
||||||
|
|
||||||
curEvent = PopNextEvent();
|
curEvent = PopNextEvent();
|
||||||
if (!curEvent && mayWait) {
|
if (!curEvent && mayWait) {
|
||||||
|
SAMPLE_LABEL("nsAppShell::ProcessNextNativeEvent", "Wait");
|
||||||
// hmm, should we really hardcode this 10s?
|
// hmm, should we really hardcode this 10s?
|
||||||
#if defined(DEBUG_ANDROID_EVENTS)
|
#if defined(DEBUG_ANDROID_EVENTS)
|
||||||
PRTime t0, t1;
|
PRTime t0, t1;
|
||||||
EVLOG("nsAppShell: waiting on mQueueCond");
|
EVLOG("nsAppShell: waiting on mQueueCond");
|
||||||
t0 = PR_Now();
|
t0 = PR_Now();
|
||||||
|
|
||||||
mQueueCond.Wait(PR_MillisecondsToInterval(10000));
|
mQueueCond.Wait(PR_MillisecondsToInterval(10000));
|
||||||
t1 = PR_Now();
|
t1 = PR_Now();
|
||||||
EVLOG("nsAppShell: wait done, waited %d ms", (int)(t1-t0)/1000);
|
EVLOG("nsAppShell: wait done, waited %d ms", (int)(t1-t0)/1000);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче