How to Set up ARM streamline Performance Analyzer on ODROID-GO Advance/Super
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 Advance/Super.
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 Advance/Super.
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.
Install DS-5 Development Studio
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 Advance will be kept as v6.5.1, until DS-5 Community Edition is updated.
Build Kernel and Gator Module
(updated 2020.02.14)
This sections describes a build instruction of kernel gator module.
If you use the latest official version of ODROID-GO Advance 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
- target
odroid@odroid:~$ wget https://dn.odroid.com/ODROID_GO_ADVANCE/gator.ko
[Option 2] Build kernel with related commits
https://github.com/hardkernel/linux/commit/9b681d5c4f23eac9bad17f75ef41a2c4fe4f698b
https://github.com/hardkernel/linux/commit/fcd6a0b7a58792917c1cec64fc77ff981243b2ed
Build Userspace Gator Daemon
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 Advance board.
Download
You should use gator daemon v6.5.1 to synchronize with the gator driver of ODROID-GO Advance.
Also, some patches to run gator daemon on ODROID-GO Advance are needed because the sysfs node to read the mali GPU information is different from the existing one from the ARM-software github.
- target
odroid@odroid:~$ sudo apt-get install git odroid@odroid:~$ git clone https://github.com/JeonghwaCho/gator.git -b odroid-rk3326
Build
- target
odroid@odroid:~$ cd ${path_of_gator}/daemon odroid@odroid:~$ make
Now you will have gatord binary in ${path_of_gator}/daemon directory.
Start Gator on target and Streamline on Host PC
1. On ODROID-GO Advance/Super
You need root permission to make an ethernet connection and run gatord.
(1) Config up Network connection
- target
odroid@odroid:~$ su root@odroid:~# dhclient eth0
(2) Disable kernel hung task timeout
- target
root@odroid:~# echo 0 > /proc/sys/kernel/hung_task_timeout_secs
(3) Run userspace gator daemon and kernel module
- target
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 Bifrost GPU of RK3326 is defined in gator.ko, so you will need to get ARM_Mali-Bifrost- related events under /dev/gator/events/
- target
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 Advance 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 Advance will be shown in this menu.
Further Information
For more detailed information, please refer to the ARM developer site.