Skip to content

Make trace fd thread local and have thread specific files

Lucas Fryzek requested to merge Hazematman/freedreno:android_apk_tracing into master

When tracing android APKs, there are multiple threads running that use the driver. This creates per thread files, preventing the multiple threads from clobbering the trace file.

An android APK can be traced by uploading the file to /system/lib64/ (I found it needs to be in the system folder to prevent android related permission issues). You can then get an app to do LD_PRELOAD by running in an adb shell:

setprop wrap.<app name> "LD_PRELOAD=/system/lib64/"

This change also moves the trace file from /sdcard/ to /sdcard/Download/ for similar android permission related issues.

Merge request reports