How to Set up ARM streamline Performance Analyzer on ODROID-N2

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-N2.

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-N2.
To observe the change of CPU usage, a benchmark tool, stress-ng is used.

  • 1st run : burning all cpus (stress-ng –cpu 6)
  • 2nd run : burning only 2 big cores (stress-ng –cpu 2)

At the 1st red box, all CPU activity components of A73 & A53 show peak point 100%,
and in another case, only A73 activity reaches to 100%.


Using ARM Streamline, you can monitor the main components of the Mali-related and other system components.

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-N2 will be kept as v6.7, until DS-5 Community Edition is updated.

The latest version of N2 kernel package already includes pre-built kernel gator module those version is v6.7.

odroid:~$ ls /lib/modules/$(uname -r)/kernel/drivers/gator/
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-N2 board.

Download

You should use gator daemon v6.7 to synchronize with the gator driver of ODROID-N2.

odroid@odroid:~$ sudo apt-get install git
odroid@odroid:~$ git clone https://github.com/ARM-software/gator -b 6.7

Build

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

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

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

(1) Disable kernel hung task timeout

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

(2) 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                 114688  1
odroid@odroid:~$ ls /dev/gator/events/
ARMv8_Cortex_A53_ccnt  ARMv8_Cortex_A53_softirq  ARMv8_Cortex_A73_cnt4     Linux_block_rq_wr          Linux_net_tx
ARMv8_Cortex_A53_cnt0  ARMv8_Cortex_A53_switch   ARMv8_Cortex_A73_cnt5     Linux_cpu_wait_contention  Linux_proc_statm_data
ARMv8_Cortex_A53_cnt1  ARMv8_Cortex_A53_system   ARMv8_Cortex_A73_freq     Linux_cpu_wait_io          Linux_proc_statm_share
ARMv8_Cortex_A53_cnt2  ARMv8_Cortex_A53_user     ARMv8_Cortex_A73_irq      Linux_meminfo_bufferram    Linux_proc_statm_size
ARMv8_Cortex_A53_cnt3  ARMv8_Cortex_A73_ccnt     ARMv8_Cortex_A73_softirq  Linux_meminfo_cached       Linux_proc_statm_text
ARMv8_Cortex_A53_cnt4  ARMv8_Cortex_A73_cnt0     ARMv8_Cortex_A73_switch   Linux_meminfo_memfree      mmapped_cnt0
ARMv8_Cortex_A53_cnt5  ARMv8_Cortex_A73_cnt1     ARMv8_Cortex_A73_system   Linux_meminfo_memused      mmapped_cnt1
ARMv8_Cortex_A53_freq  ARMv8_Cortex_A73_cnt2     ARMv8_Cortex_A73_user     Linux_meminfo_slab         mmapped_cnt2
ARMv8_Cortex_A53_irq   ARMv8_Cortex_A73_cnt3     Linux_block_rq_rd         Linux_net_rx

Via Ethernet interface, you can connect ODROID-N2 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-N2 will be shown in this menu.