gecko-dev/widget/android
Aaron Klotz 6dccadfc16 Bug 1713378: Use a more accurate stack top pointer when registering the Android UI thread with the profiler; r=gerald,geckoview-reviewers,owlish
We were previously registering the Android UI thread with the profiler using
the `PROFILER_REGISTER_THREAD` macro.

This macro uses the address of a local variable as an estimate for the top of
the thread's call stack. The profiler's sampling thread does not walk the stack
any further past this value.

This works fine most of the time, as it's usually one of the first things that
we do when running a new thread.

On the other hand, the Android UI thread already has a bunch of stuff on the
stack (including VM frames) by the time we go to set this, plus we have two or
three of our own calls already on the stack as well. Using the current stack
frame as an estimate for the top of the stack results in the profiler omitting
numerous frames from the Android UI thread because it mistakenly believes that
it needs to stop walking the stack sooner than it actually needs to!

Instead of using the macro, this patch uses pthreads to resolve the real stack
top and supplies that pointer to the profiler instead.

Differential Revision: https://phabricator.services.mozilla.com/D116284
2021-05-31 22:44:19 +00:00
..
bindings
jni
AndroidAlerts.cpp
AndroidAlerts.h
AndroidBridge.cpp
AndroidBridge.h
AndroidBridgeUtilities.h
AndroidCompositorWidget.cpp
AndroidCompositorWidget.h
AndroidContentController.cpp
AndroidContentController.h
AndroidUiThread.cpp Bug 1713378: Use a more accurate stack top pointer when registering the Android UI thread with the profiler; r=gerald,geckoview-reviewers,owlish 2021-05-31 22:44:19 +00:00
AndroidUiThread.h
AndroidView.h
AndroidVsync.cpp
AndroidVsync.h
Base64UtilsSupport.h
components.conf
EventDispatcher.cpp
EventDispatcher.h
GeckoBatteryManager.h
GeckoEditableSupport.cpp
GeckoEditableSupport.h
GeckoNetworkManager.h
GeckoProcessManager.cpp
GeckoProcessManager.h
GeckoScreenOrientation.h
GeckoSystemStateListener.h
GeckoTelemetryDelegate.h
GeckoViewSupport.h
GeckoVRManager.h
GfxInfo.cpp Bug 1712148 - Disable webrender for Adreno 3xx devices running Android 9 and later. r=aosmond 2021-05-20 17:01:48 +00:00
GfxInfo.h
ImageDecoderSupport.cpp Bug 1709406 - Propagate errors from ImageDecoderSupport. r=aklotz 2021-05-13 23:50:18 +00:00
ImageDecoderSupport.h
MediaKeysEventSourceFactory.cpp
moz.build Bug 1701269 - Remove PrefsHelper. r=owlish 2021-05-20 22:03:07 +00:00
nsAppShell.cpp Bug 1701269 - Remove PrefsHelper. r=owlish 2021-05-20 22:03:07 +00:00
nsAppShell.h
nsClipboard.cpp
nsClipboard.h
nsDeviceContextAndroid.cpp
nsDeviceContextAndroid.h
nsIAndroidBridge.idl
nsLookAndFeel.cpp
nsLookAndFeel.h
nsNativeBasicThemeAndroid.cpp
nsNativeBasicThemeAndroid.h
nsNativeThemeAndroid.cpp
nsNativeThemeAndroid.h
nsPrintSettingsServiceAndroid.cpp
nsPrintSettingsServiceAndroid.h
nsUserIdleServiceAndroid.cpp
nsUserIdleServiceAndroid.h
nsWidgetFactory.cpp
nsWidgetFactory.h
nsWindow.cpp
nsWindow.h
ScreenHelperAndroid.cpp
ScreenHelperAndroid.h
Telemetry.h
WebAuthnTokenManager.h
WebExecutorSupport.cpp
WebExecutorSupport.h
WindowEvent.h