Capture Weston/Wayland logs
You can use the Wayland/Weston logs to verify whether the display driver is loaded on the device and to find the supported OpenGL ES extensions. To capture the Weston/Wayland debug logs, run the following command before launching the Weston or any other application:Debug Kernel/KGSL
You can evaluate the performance of your application by adjusting the GPU to different frequency levels and setting the GPU or CPU to performance mode. Based on these evaluations, you can optimize the performance of your application.Set CPU to performance mode
- Remount the file system using the following command:
- To set all CPU cores, replace
cpuxwithcpu0,cpu1, andcpun.Sample output ondemand userspace performance schedutil - If any CPU clock is running at a low frequency, set the CPU to performance mode and verify the issue by running the following command:
- To validate the trial settings, run the following commands:
Set GPU frequency
Note The following commands work only with the Adreno/KGSL overlay or the qcom‑multimedia‑proprietary‑image.- Remount the file system using the following command:
- For the power level, check the
available_frequenciessys node.Sample output 812000000 700000000 608000000 550000000 450000000 315000000 From the sample output, you can interpret GPU power levels as:Frequency 812000000 700000000 608000000 550000000 450000000 315000000 Power level 0 1 2 3 4 5 - Increment the GPU power level by one and perform the GPU power-level test by substituting
<level>with 0, 1, 2, 3, 4, and 5 in the following commands:
- The Adreno GPU frequency is fixed at 315 MHz.
- The power levels specified here aren’t supported and the output of the
available_frequenciescommand displays 315000000.
Set GPU to performance mode
- To set the GPU to performance mode, run the following command:
Note These commands force the GPU to always run at the maximum frequency.
- To ensure that the GPU doesn’t enter the low-power state even if the device is idle for 10000000 ms, run the following command:
- To set the GPU to performance mode while ensuring that the GPU doesn’t enter the low-power state, run the following command:
Check other KGSL settings
- To enable the KGSL clock, run the following command:
- To enable the KGSL rail, run the following command:
- To enable the KGSL bus, run the following command:
Debug OpenGL ES-based applications
You can use the Snapdragon Profiler tool to capture snapshots and real-time traces of OpenGL ES applications. For more information, see Snapdragon Profiler.Debug OpenCL-based applications
You can use the Snapdragon Profiler tool to capture snapshots and real-time traces of OpenCL applications.- For more information, see Snapdragon Profiler.
- For performance profiling, see Performance profiling in Qualcomm® Snapdragon™ Mobile Platform OpenCL General Programming and Optimization Guide.
clGetEventProfilingInfo API.
Debug Vulkan-based applications
Use the Snapdragon Profiler tool to capture snapshots and real-time traces of Vulkan applications. For more information, see Snapdragon Profiler. Also, you can use validation layers to debug Vulkan applications.Debug Vulkan application using validation layers
To debug a Vulkan application using validation layers, do the following on the Linux host computer:- To set the source environment, run the following command:
- To download the validation layers, run the following command:
- To build the validation layers, run the following commands:
Note If the
/tmp/local/debug/vulkandirectory isn’t available, create a similar directory. - To enable the validation layers on Vulkan applications, set the
VK_INSTANCE_LAYERSenvironment variable as follows: - To edit or append the settings in the
layers/vk_layer_settings.txtfile, run the following command: - To push the
layers/vk_layer_settings.txtfile to the device, run the following command: - To dump the log, add path of the validation layers by running the following command:
This command generates the dumps in the same directory where the Vulkan application binary exists.
tmp directory, save the Vulkan application binary to another location. If you change the location of the binary, ensure that you update the environment variables and verify the changes after rebooting.
