mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 791640 - EventTracer will only measure the main thread responsiveness, fixes profiling hang. r=blassey
--HG-- extra : rebase_source : a5a9074b74ab8638cfc4b568b0d09ca7b5e61b17
This commit is contained in:
parent
896de64465
commit
67e3ae7491
@ -1662,25 +1662,6 @@ public class GeckoAppShell
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static SynchronousQueue<Date> sTracerQueue = new SynchronousQueue<Date>();
|
||||
public static void fireAndWaitForTracerEvent() {
|
||||
getMainHandler().post(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
sTracerQueue.put(new Date());
|
||||
} catch(InterruptedException ie) {
|
||||
Log.w("GeckoAppShell", "exception firing tracer", ie);
|
||||
}
|
||||
}
|
||||
});
|
||||
try {
|
||||
sTracerQueue.take();
|
||||
} catch(InterruptedException ie) {
|
||||
Log.w("GeckoAppShell", "exception firing tracer", ie);
|
||||
}
|
||||
}
|
||||
|
||||
// unused
|
||||
static void checkUriVisited(String uri) {}
|
||||
// unused
|
||||
|
@ -1939,24 +1939,6 @@ public class GeckoAppShell
|
||||
return sEventDispatcher;
|
||||
}
|
||||
|
||||
static SynchronousQueue<Date> sTracerQueue = new SynchronousQueue<Date>();
|
||||
public static void fireAndWaitForTracerEvent() {
|
||||
getMainHandler().post(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
sTracerQueue.put(new Date());
|
||||
} catch(InterruptedException ie) {
|
||||
Log.w(LOGTAG, "exception firing tracer", ie);
|
||||
}
|
||||
}
|
||||
});
|
||||
try {
|
||||
sTracerQueue.take();
|
||||
} catch(InterruptedException ie) {
|
||||
Log.w(LOGTAG, "exception firing tracer", ie);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a previously-registered listener for a gecko event.
|
||||
* This method is thread-safe and may be called at any time. In particular, calling it
|
||||
|
@ -140,7 +140,6 @@ AndroidBridge::Init(JNIEnv *jEnv,
|
||||
jScanMedia = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "scanMedia", "(Ljava/lang/String;Ljava/lang/String;)V");
|
||||
jGetSystemColors = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "getSystemColors", "()[I");
|
||||
jGetIconForExtension = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "getIconForExtension", "(Ljava/lang/String;I)[B");
|
||||
jFireAndWaitForTracerEvent = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "fireAndWaitForTracerEvent", "()V");
|
||||
jCreateShortcut = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "createShortcut", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
|
||||
jGetShowPasswordSetting = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "getShowPasswordSetting", "()Z");
|
||||
jPostToJavaThread = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "postToJavaThread", "(Z)V");
|
||||
@ -1446,18 +1445,6 @@ AndroidBridge::OpenGraphicsLibraries()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AndroidBridge::FireAndWaitForTracerEvent() {
|
||||
JNIEnv *env = GetJNIEnv();
|
||||
if (!env)
|
||||
return;
|
||||
|
||||
AutoLocalJNIFrame jniFrame(env, 0);
|
||||
env->CallStaticVoidMethod(mGeckoAppShellClass,
|
||||
jFireAndWaitForTracerEvent);
|
||||
}
|
||||
|
||||
|
||||
namespace mozilla {
|
||||
class TracerRunnable : public nsRunnable{
|
||||
public:
|
||||
@ -1479,7 +1466,6 @@ namespace mozilla {
|
||||
if (!AndroidBridge::Bridge())
|
||||
return NS_OK;
|
||||
|
||||
AndroidBridge::Bridge()->FireAndWaitForTracerEvent();
|
||||
mHasRun = true;
|
||||
mTracerCondVar->Notify();
|
||||
return NS_OK;
|
||||
|
@ -252,8 +252,6 @@ public:
|
||||
|
||||
bool GetShowPasswordSetting();
|
||||
|
||||
void FireAndWaitForTracerEvent();
|
||||
|
||||
/* See GLHelpers.java as to why this is needed */
|
||||
void *CallEglCreateWindowSurface(void *dpy, void *config, AndroidGeckoSurfaceView& surfaceView);
|
||||
|
||||
@ -442,7 +440,6 @@ protected:
|
||||
jmethodID jScanMedia;
|
||||
jmethodID jGetSystemColors;
|
||||
jmethodID jGetIconForExtension;
|
||||
jmethodID jFireAndWaitForTracerEvent;
|
||||
jmethodID jCreateShortcut;
|
||||
jmethodID jGetShowPasswordSetting;
|
||||
jmethodID jPostToJavaThread;
|
||||
|
Loading…
Reference in New Issue
Block a user