You copied the Doc URL to your clipboard.

Setting up Streamline to support an ARM® Mali™-based device

Streamline enables you to gather GPU-specific profiling data for a Mali-based device. This adds a significant amount of data about the graphical performance of your target to the Analysis Reports.

Mali Utgard and Mali Midgard are architectures that underlie a number of GPUs. Kernel space gator supports both Mali Utgard and Mali Midgard-based devices. In addition, user space gator version 22 and later supports Mali Utgard-based devices. Mali Utgard DDK version r6p0-00rel0 supports user space gator.

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 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,

You can choose to build the Mali and gator drivers either in-tree or out-of-tree. Building the modules out-of-tree might be simpler and quicker, but building them in-tree might give better results. This is because recent versions of Android do not allow loading kernel modules. Also, building the Mali driver in-tree can avoid possible problems with tracepoints in kernel modules in Linux 3.15 and later.

Follow the normal installation and setup instructions for Streamline and gatord. If you are using kernel space gator, see the topic 1.8 Building the gator module for information on how to build gator.ko. The following instructions describe the additional configuration options required by gator.ko to support Mali-based devices. They assume you are building gator.ko out-of-tree.


  1. 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 source needs to #include "linux/mali_linux_trace.h"
      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 the Mali drivers, user space needs the following options:


      Kernel space needs USING_PROFILING=1 # Sets CONFIG_MALI400_PROFILING=y

      These settings are the defaults in later driver versions. See the documentation supplied with the ARM Driver Development Kit (DDK) for Mali-4xx GPUs for more details.

    • For a Mali Midgard GPU, specify the following options to your gator.ko make command:

      # gator source needs access to headers under .../kernel/drivers/gpu/arm/... 
      # a default of . is suitable for in-tree builds

      For details of the corresponding options required by the Mali drivers, see the documentation supplied with the ARM DDK for Mali Midgard GPUs.

  2. Install the gator driver as a kernel module as normal:
    insmod gator.ko


    If you chose to build the Mali driver out of tree, you should install it before installing the gator driver.
  3. 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 driver 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.