ODROID-GO Advance Performance Analysis: Using ARM Streamline

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.

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

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

Figure 1 - Sample of ARM Streamline capture with ODROID GO Advance
Figure 1 - Sample of ARM Streamline capture with ODROID GO Advance

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

Figure 2 - Sample of ARM streamline capture with CPU information
Figure 2 - Sample of ARM streamline capture with CPU information

Figure 3 - Sample of ARM streamline capture with CPU information
Figure 3 - Sample of ARM streamline capture with CPU information

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 at https://developer.arm.com/products/software-development-tools/ds-5-development-studio/editions/community-edition.

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 The Kernel and Gator Module

In the latest version of the ODROID-GO Advance image, there is no gator module. It will be included in the next official release, so please refer to the following options if there is no new OS release version.

[Option 1] Pre-built gator.ko:

odroid@odroid:~$ wget https://dn.odroid.com/ODROID_GO_ADVANCE/gator.ko
[Option 2] Build a kernel with the 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.

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.

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

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 the ODROID-GO Advance You need root permission to make an ethernet connection and run gatord.

(1) Config up Network connection

odroid@odroid:~$ su
root@odroid:~# dhclient eth0
(Figure 4 - ODROID-GO Advance connected over Ethernet)

(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:
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 the Host PC Via Ethernet interface, you can connect ODROID-GO Advance device to Streamline on your host PC. Please set [Connection] - [Address].

Figure 4 - Capture and Analysis in Streamline
Figure 4 - Capture and Analysis in Streamline

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

Figure 5 - Counter configuration in Streamline
Figure 5 - Counter configuration in Streamline

Further Information

For more detailed information, please refer to the ARM developer site and user guide at https://developer.arm.com/products/software-development-tools/ds-5-development-studio/streamline and https://static.docs.arm.com/dui0482/w/DUI0482W_streamline_user_guide.pdf. The original wiki entry can be found on the Hardkernel wiki page at https://wiki.odroid.com/odroid_go_advance/application_note/arm_streamline_on_goa.

Be the first to comment

Leave a Reply