odroid-xu4:application_note:arm_streamline_on_xu4

How to Set up ARM Streamline Performance Analyzer on ODROID-XU4

Streamline is a graphical performance analysis tool that present report data in both visual and statistical forms.
It uses hardware performance counters with kernel metrics to provide an accurate representation of system resources.
This wiki page describes the way how to set-up and run Streamline on ODROID-XU4 system.

Summary

  • Install DS-5 Community Edition on Host PC
  • Building Kernel and Gator Module
  • Building Gator Daemon
  • Running Gator on Target and Streamline on Host PC

The release version , 4.14.37-130 (Apr 30, 2018) and higher version is available to run Streamline.

[ License Issue ]

The latest Streamline version in DS-5 Community Edition is v6.7.1,
and it doesn't support the higher version of gator than v6.7.1.
Only DS-5 Ultimate, Professional Edition and DS-5 Development Studio support the latest gator version.

DS-5 Community Edition
Version: 5.29.1
Build number: 5291003
Arm Streamline Performance Analyzer
Version 6.7.1, Build 20180716_103422

So, please note that the current gator version of ODROID-XU4 will be kept as v6.5.1.
until DS-5 Community Edition is updated.

(updated 2019.01.21)

First, please download DS-5 and install on your Host PC.
If you don't have any license, you can try DS-5 Community Edition.
https://developer.arm.com/products/software-development-tools/ds-5-development-studio/editions/community-edition

To run Streamline, you must enable certain kernel configuration options.
Also you can use kernel space gator that provides more features than user space gator.

The version, 4.14.37-130 has been released that includes the commit,
so you don't need to build kernel source.

For more information about kernel configuration and gator module, please refer to the following links.
If you use the lower version, the following will be helpful to build up your environment.

Kernel Configuration

[1] https://static.docs.arm.com/dui0482/w/DUI0482W_streamline_user_guide.pdf

  • Section 1.3 Streamline prerequisites on page 1-18.
  • Section 1.6 Required kernel configuration menu options on page 1-23.

[2] https://github.com/ARM-software/gator#kernel-configuration

gator kernel module, gator.ko

To communicate with target device, Streamline requeires the gator daemon, gatord, to be running on the device.
Streamline includes a pre-built gatord binary and you can refer to the following link.
But a sysfs node to gather information are different on ODROID-XU4,
so it's needed to build gatord.

Download

You can download gator damon from this site.
https://github.com/ARM-software/gator
You should use gator daemon v6.5.1 to synchronize with gator driver of XU4.
Also the following commit to run gator daemon on ODROID-XU4 is needed because the clock node of mali GPU is different from the existing one in ARM-software github.
https://github.com/JeonghwaCho/gator/commit/594d4c7ca43ed0af53afa890e382e2dfbceb6369

Here is the clone repository of gator daemon v6.5.1 with the commit.

target
odroid@odroid:~$ sudo apt-get install git
odroid@odroid:~$ git clone https://github.com/JeonghwaCho/gator.git

Build

Now you can build it.

target
odroid@odroid:~$ cd ${path_of_gator}
odroid@odroid:~$ cd daemon
odroid@odroid:~$ make

You need root privileges to run gatord.

target
odroid@odroid:~$ su
root@odroid:~# ${gator_path}/gator/daemon/gatord  -m  /lib/modules/$(uname -r)/kernel/drivers/gator/gator.ko &

You can determine if gator is running as following.

target
root@odroid:~# lsmod | grep gator
gator                  90112  1

Mali Midgard GPU is defined in gator.ko, so you will get ARM_Mali-Midgard- and -T62X related events under the /dev/gator/events/

target
root@odroid:~# ls /dev/gator/events/
ARM_Mali-Midgard_Filmstrip_cnt0        ARM_Mali-T62x_LS_RESTARTS
ARM_Mali-Midgard_fragment              ARM_Mali-T62x_LS_TLB_HIT
ARM_Mali-Midgard_MMU_AS_0              ARM_Mali-T62x_LS_TLB_MISS
ARM_Mali-Midgard_MMU_AS_1              ARM_Mali-T62x_LS_WORDS
ARM_Mali-Midgard_MMU_AS_2              ARM_Mali-T62x_MESSAGES_RECEIVED
.....
.....

Via Ethernet interface, you can connect ODROID-XU4 device to Streamline on your host PC.
Please set [Connection] - [Address].

If the connection is established successfully, all of available counters to fit XU4 system will be shown in this menu.

For more detailed information, please refer to the ARM developer site.

In the release version of ODROID-XU4, a defconfig, CONFIG_DEBUG_INFO is NOT included by default.
The option is only required for profiling the Linux kernel.
If you need the functionality, it's needed to build kernel.
Please refer to the following guide.

  • odroid-xu4/application_note/arm_streamline_on_xu4.txt
  • Last modified: 2019/12/12 18:08
  • by joy.cho