I am trying to trace the OpenCL calls using the MGD V4.2.1 but I don't see any calls being traced.
I have done the setup both on the target and host side and able to trace the OpenGL calls using the same setup.
Setup I have done on my host and target:
adb remount
adb push "C:\Program Files\ARM\Mali Developer Tools\Mali Graphics Debugger v4.2.0\target\android\arm\mgddaemon" /system/bin/mgddaemon
adb push "C:\Program Files\ARM\Mali Developer Tools\Mali Graphics Debugger v4.2.0\target\android\arm\egl.cfg" /vendor/lib/egl/egl.cfg
adb push "C:\Program Files\ARM\Mali Developer Tools\Mali Graphics Debugger v4.2.0\target\android\arm\egl.cfg" /vendor/lib64/egl/egl.cfg
adb push "C:\Program Files\ARM\Mali Developer Tools\Mali Graphics Debugger v4.2.0\target\android\arm\armeabi-v7a\libGLES_mgd.so" /vendor/lib/egl/libGLES_mgd.so
adb push "C:\Program Files\ARM\Mali Developer Tools\Mali Graphics Debugger v4.2.0\target\android\arm\arm64-v8a\libGLES_mgd.so" /vendor/lib64/egl/libGLES_mgd.so
adb shell chmod 777 /system/bin/mgddaemon
adb shell chmod 777 /vendor/lib/egl/*
adb shell chmod 777 /vendor/lib64/egl/*
adb shell ln -s /vendor/lib/egl/libGLES_mgd.so /vendor/lib/egl/libGLES.so
adb shell ln -s /vendor/lib64/egl/libGLES_mgd.so /vendor/lib64/egl/libGLES.so
adb forward tcp:5002 tcp:5002
After doing all these setup I am able to run the mgddaemon on the host side and able to connect host to target but can't see any OpenCL calls in MGD.
I am using the 64bit kernel and 64bit Android M and application that I am using to trace for tracing the calls is Opencl-X Benchmark.
Need help to figure out what I am missing so that I can trace the calls?
You can't link against libGLES_mali.so directly when trying to insert a layer driver - you need to create an intermediate name to bounce the redirection off.
The process needs to be something like this:
When building your application:
When running your application normally:
When running your application with MGD:
Let me know how that goes.
Cheers, Pete
Thanks Pete for your suggestion. Its working for me now. I am able to get the API trace in the MGD with above steps.
Cheers
Virender