How to Set up ARM streamline Performance Analyzer on ODROID-GO Advanced

Streamline is a graphical performance analysis tool that presents report data in both visual and statistical forms. It uses hardware performance counters with kernel metrics to provide an accurate representation of the target system's resources. This wiki page describes how to set-up and run Streamline and monitor the ODROID-GO Advanced.

Summary

  • Install DS-5 Community Edition on the Host PC
  • Build the Kernel and Gator Module
  • Build the Gator Daemon
  • Start Gator on the target and Streamline on Host PC

Here is a sample of ARM Streamline capture with ODROID GO Advanced.
At time 48s, glmark2-es2 is started and you can see graph transitions of Mali-related components.


Using ARM Streamline, you can monitor the main components of the CPU.

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

[ NOTE : License Issue ]

The latest Streamline version of DS-5 Community Edition is currently v6.7.1, it will not support a higher version of gator, above v6.7.1.
Only DS-5 Ultimate, Professional Edition, and DS-5 Development Studio support the latest gator version. So, please note that the current gator version for the ODROID-GO Advanced will be kept as v6.5.1, until DS-5 Community Edition is updated.

(updated 2020.02.14)
This sections describes a build instruction of kernel gator module.
If you use the latest official version of ODROID-GO Advanced image, skip this sector
because there is a pre-built gator module in the image. ( /lib/modules/4.4.189-14/kernel/drivers/gator/gator.ko )

[Option 1] Pre-built gator.ko

odroid@odroid:~$ wget https://dn.odroid.com/ODROID_GO_ADVANCE/gator.ko

To communicate with the target device, Streamline requires the gator daemon, gatord, to be running on the device. Here are the instructions to build the gator daemon on your ODROID-GO Advanced board.

Download

You should use gator daemon v6.5.1 to synchronize with the gator driver of ODROID-GO Advanced. Also, some patches to run gator daemon on ODROID-GO Advanced are needed because the sysfs node to read the mali GPU information is different from the existing one from the ARM-software github.

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

Build

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

Now you will have gatord binary in ${path_of_gator}/daemon directory.

1. On ODROID-GO Advanced

You need root permission to make an ethernet connection and run gatord.

(1) Config up Network connection

odroid@odroid:~$ su
root@odroid:~# dhclient eth0

(2) Disable kernel hung task timeout

root@odroid:~# echo 0 > /proc/sys/kernel/hung_task_timeout_secs

(3) Run userspace gator daemon and kernel module

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.

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

Mali Bifrost GPU of RK3326 is defined in gator.ko, so you will need to get ARM_Mali-Bifrost- related events under /dev/gator/events/

root@odroid:~# ls /dev/gator/events/
ARM_Mali-Bifrost_Filmstrip_cnt0     ARMv8_Cortex_A35_cnt0
ARM_Mali-Bifrost_MMU_AS_0           ARMv8_Cortex_A35_cnt1
ARM_Mali-Bifrost_MMU_AS_1           ARMv8_Cortex_A35_cnt2
ARM_Mali-Bifrost_MMU_AS_2           ARMv8_Cortex_A35_cnt3
ARM_Mali-Bifrost_MMU_AS_3           ARMv8_Cortex_A35_cnt4
ARM_Mali-Bifrost_MMU_PAGE_FAULT_0   ARMv8_Cortex_A35_cnt5
ARM_Mali-Bifrost_MMU_PAGE_FAULT_1   ARMv8_Cortex_A35_freq
.....
.....

2. On Host PC

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

If the connection is established successfully, all of the available counters for the ODROID-GO Advanced will be shown in this menu.