Forums - Can't profile OpenCL apps

4 posts / 0 new
Last post
Can't profile OpenCL apps
Alignas
Join Date: 1 Aug 18
Posts: 2
Posted: Mon, 2018-08-06 08:08

I'm trying to use Snapdragon Profiler to optimize the performance of an Android app that uses OpenCL on my Lenovo Tab 4 with Android 7.1.1.

I am following the steps shown in this video: https://youtu.be/mevcqGF-jhc?t=89 (though I am not using the command line to launch the app and "enable blocking" is set to false)

I want to start a new trace capture and click the corresponding button, but the process list is empty - the app I want to profile never appears there. It does not matter whether its activity is shown.

However, when I launch any other app that uses OpenGL (I tried the NewPipe YouTube player and a couple of others), it appears in this list just fine and the OpenGL ES metric is available.

I can see my app in the process list only when I click the realtime button, but there is no OpenCL metric (or anything related to OpenCL at all) available for the process in the metrics tree view. The same goes for the OpenCL-Z info app (libOpenCL.so is loaded dynamically with dlopen in both cases, can it have something to do with it, btw?)

I also tried to use Adreno Profiler, but could not even connect to my app - it never appeared in the list (but I saw NewPipe there).

The Adreno Profiler docs say that the ADRENO_PROFILER_ENABLE_OPENCL system property must be set to enable profiling for OpenCL apps. However, nothing about it is mentioned in the user guide for Snapdragon Profiler. Could it be the cause?

  • Up0
  • Down0
eshaw Moderator
Join Date: 12 May 16
Location: San Diego
Posts: 140
Posted: Mon, 2018-08-06 15:22

Hi,

Just to clarify, is your device a Tab 4 or a Tab 4 Plus? Snapdragon Profiler will only provide GPU data on a Tab 4 Plus. The base Tab 4 has an Adreno 300 series GPU, which is not supported by Snapdragon Profiler.

If you have the Tab 4 Plus, please ensure your app has internet permissions enabled, and that you only start your app after connecting Snapdragon Profiler to the device (verify the app has completely exited before connecting Profiler and is not just idle in the background). If that does not solve your problem, please capture log output from the device using this command:

adb logcat *:S Adreno:V SDPCore:V 

That log information will help us debug the issue further.

Eric

  • Up0
  • Down0
Alignas
Join Date: 1 Aug 18
Posts: 2
Posted: Tue, 2018-08-07 04:53

Quote:
please ensure your app has internet permissions enabled

Thanks, that fixed the issue. Now I can see the app.

I do not remeber it being mentioned in the user guide, however. Did I miss it or it was not there?

If so, you guys should really add it somewhere it can be seen easily. Enabling the internet permission is not the most obvious thing to do in this situation.

  • Up0
  • Down0
eshaw Moderator
Join Date: 12 May 16
Location: San Diego
Posts: 140
Posted: Fri, 2018-08-10 18:12

Glad to hear you got it working.

The internet permissions requirement is mentioned in some of the help text that is displayed in the Profiler UI, but depending on your situation you may not see that. We agree that the documentation needs improvement, and we have plans to address that soon.

Eric

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.