This blog in brief is about Codeplay modifying CodeXL, AMD’s open sourced profiling tool, to be able for the first time to capture and display power usage data from a standard Android device. Codeplay have created a video to demonstrate this new capability. By adding this new capability LPGPU2 has opened up far reaching possibilities of profiling non AMD hardware and/or remote low power devices utilizing mobile OS’s such as Android and Tizen.
About the CodeXL <-> Android power profiling
LPGPU2’s version of CodeXL has added a new capability to be able to communicate with and retrieve power data from standard Android devices or any other device that implements the DC API (see below for more on this new API) and makes the data captured accessible to CodeXL via a custom extension to its remote protocol.
By extending CodeXL’s remote protocol to communicate with the Android device it is now able to receive power data sent from any remote application or library which implements the API on that device. We intend to further augment this by adding API call data as well as other items of interest.
The CodeXL remote device protocol remains backward compatible. CodeXL can update its live visualisations in real time while also recording the new power data to its standard but extended database for static analysis offline later (see below for more information). Again, like the remote protocol the database layer within CodeXL remains compatible with existing CodeXL projects.
The Android device is a standard phone, which has not been rooted. This ability to allow profiling to take place on any standard device is important for ease of use and to increase the number of possible users.
The phone has a custom application installed on it which installs a service which listens out for CodeXL to attach to it. When a connection is established the service provides CodeXL with information about the applications it can profile. The user can then start the selected application which commences sending profiling data back to CodeXL using the DC API.
For this demonstration the version of CodeXL shown is only able to communicate with an Android OS type device but this will change to manage communication with applications on other OS / devices in the future. For the LPGPU2 project Android is the primary mobile operating system.
The Data Collection (DC) API
At part of LPGPU2’s statement of work and early project planning it became clear that a standardised performance and power counter API was necessary to be developed and ready before trying to profile supported devices.
Rather than implement a different mechanism for each supported Khronos API the DC API was designed to support those APIs in a non-intrusive manner by being an API neutral solution to the problem of enumerating, describing, enabling, disabling and collecting data from disparate hardware with equally varied counter implementations.
The DC API has been developed by Samsung and implemented by Samsung and ThinkSilicon. The DC API can be implemented by an application or library on any remote device, not just an Android device.
Static Analysis
The beauty of being able to capture profiling data from a device is not just in the real time capture capability shown in the video but also when CodeXL is in offline mode permitting static analysis.
Samsung are developing as part of the LPGPU2 project a feedback engine which will analyze the captured data and feed back to the user efficiency anomalies. Codeplay have extended CodeXL’s data visualisations to highlight regions of interest within the profiling data from which the user can choose to examine the source code which is associated with the areas identified as possible sources of inefficiencies and be presented with advice and suggestions to improve their applications.
For more information on the Feedback engine please see the article “Farewell Borja and whither Feedback” on LPGU2’s web site.
Comments are closed.