This series adds Android backtrace support, which is a prerequisite for
using the refcount debugging tool in gallium. It also comes in handy
for impromptu debug outputs.

Unfortunately, it wasn't possible to reuse the existing libunwind
implementation. The only sanctioned way for obtaining backtraces on
Android is through their own, C++ only libbacktrace.

Example output from Oreo:

#00 pc 0028c14b  /system/vendor/lib/dri/gallium_dri.so
#01 pc 0003cbaf  /system/vendor/lib/dri/gallium_dri.so
#02 pc 00042eb3  /system/vendor/lib/dri/gallium_dri.so
#03 pc 000022f1  /system/vendor/lib/libgbm.so
#04 pc 0000148b  /system/vendor/lib/hw/gralloc.gbm.so (gralloc_gbm_bo_lock+322)
#05 pc 000015e5  /system/vendor/lib/hw/gralloc.gbm.so
#06 pc 0000551f  
/system/vendor/lib/hw/android.hardware.graphics.map...@2.0-impl.so 
(android::hardware::graphics::mapper::V2_0::implementation::Gralloc0Mapper::lockBuffer(native_handle
 const*, unsigned long long, 
android::hardware::graphics::mapper::V2_0::IMapper::Rect const&, int, 
void**)+122)
#07 pc 00004c61  
/system/vendor/lib/hw/android.hardware.graphics.map...@2.0-impl.so 
(android::hardware::graphics::mapper::V2_0::implementation::GrallocMapper::lock(void*,
 unsigned long long, android::hardware::graphics::mapper::V2_0::IMapper::Rect 
const&, android::hardware::hidl_handle const&, std::__1::function<void 
(android::hardware::graphics::mapper::V2_0::Error, void*)>)+84)
#08 pc 00013dfd  /system/lib/android.hardware.graphics.map...@2.0.so
#09 pc 000107cf  /system/lib/libui.so 
(android::Gralloc2::Mapper::lock(native_handle const*, unsigned long long, 
android::hardware::graphics::mapper::V2_0::IMapper::Rect const&, int, void**) 
const+110)

Stefan Schake (2):
  gallium/util: Don't stub u_debug_stack on Android
  gallium/util: Android backtrace support

 src/gallium/auxiliary/Android.mk                   |   3 +-
 src/gallium/auxiliary/util/u_debug_stack.c         |   2 +-
 .../auxiliary/util/u_debug_stack_android.cpp       | 111 +++++++++++++++++++++
 src/gallium/targets/dri/Android.mk                 |   1 +
 4 files changed, 115 insertions(+), 2 deletions(-)
 create mode 100644 src/gallium/auxiliary/util/u_debug_stack_android.cpp

-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to