Setting up Streamline to support an ARM® Mali™-based device
Streamline enables you to gather GPU-specific profiling data for a Mali-400, Mali-450, Mali-T60x, Mali-T62x, Mali-T72x or Mali-T76x based device. This adds a significant amount of data about the graphical performance of your target to the Analysis Reports.
To use Streamline with a Mali-based device, you must have the following:
- A supported Mali-based device.
- A sufficiently recent version of the mali.ko driver. The driver must be capable of generating the tracepoints needed by the gator.ko driver. Consult your supplier to see if this version of the driver is available for your device. For more information, see the Mali Developer site, http://www.malideveloper.com.
Follow the normal installation and setup instructions for Streamline and
gatord. User space gator does not support Mali GPUs, so
you also need to build gator.ko. For best
results, build it in-tree, at <
kernel_build_dir>/drivers/gator and configure it
menuconfig. See the topic Building the
gator module for instructions on how to build
gator.ko. The following instructions describe the
menuconfig options and explain how to build gator.ko for a Mali-based device out-of-tree.
Streamline only supports one type of GPU (and driver version) at once, and you choose this
at build time.
For a Mali-4xx GPU, specify the following options to your gator.ko make command:
GATOR_WITH_MALI_SUPPORT=MALI_4xx # Set by CONFIG_GATOR_MALI_4XXMP # gator source needs to #include "linux/mali_linux_trace.h" CONFIG_GATOR_MALI_PATH=".../<path_to_Mali_DDK_kernel_files>/src/devicedrv/mali" GATOR_MALI_INTERFACE_STYLE=<3|4> # 3=Mali-400 DDK >= r3p0-04rel0 and < r3p2-01rel3 # 4=Mali-400 DDK >= r3p2-01rel3 # A default of 4 is set in # gator-driver/gator_events_mali_4xx.c
To add the corresponding support to Mali technology, user space needs the following options:
The Kernel driver needs
USING_PROFILING=1 # Sets CONFIG_MALI400_PROFILING=y
These settings are the defaults in later driver versions. See the DDK integration guide for more details.
For a Mali-T6xx or Mali-T7xx GPU, specify the following options to your gator.ko make command:
GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD # Set by CONFIG_GATOR_MALI_MIDGARD # gator source needs access to headers under .../kernel/drivers/gpu/arm/... # a default of . is suitable for in-tree builds DDK_DIR=".../<path_to_Mali_DDK_kernel_files>"
To add the corresponding support to Mali technology, user space (
scons) needs the following options:
streamline_annotate=1for visual annotations.
The Kernel driver needs
See the DDK integration guide for more details.
- Insert the gator module as normal: insmod gator.ko
Verify that you built the module successfully:
ls -l /dev/gator/events/ARM_Mali*
This command should produce a list of counters.
If you have successfully built the gator module with support for Mali technology, you can run a capture session on a Mali-based target. Follow the normal instructions for setting capture options and triggering a capture session.