Page 2
This document is intended only to assist the reader in the use of the product. ARM shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product.
ARM DS-5 Using ARM Streamline Chapter 1 Conventions and Feedback Chapter 2 Setting Up Your Target Setting up an ARM Linux target ................2-2 Setting up an Android target ..................2-6 Recommended compiler options ................2-10 Mali setup for Streamline ..................2-11 Chapter 3 Using the Streamline Data View The Streamline Data view ..................
Highlights important notes, introduces special terminology, denotes internal cross-references, and citations. bold Highlights interface elements, such as menu names. Also used for emphasis in descriptive lists, where appropriate, and for ARM ® processor signal names. Feedback on this product If you have any comments and suggestions about this product, contact your supplier and give: •...
Page 6
ARM also welcomes general suggestions for additions and improvements. ARM periodically provides updates and corrections to its documentation on the ARM Information Center, together with knowledge articles and Frequently Asked Questions (FAQs). Other information •...
Setting Up Your Target ARM Streamline Performance Analyzer is a system-wide visualizer and profiler for targets running ARM Linux or Android native applications and libraries. Combining an ARM Linux kernel driver, target daemon, and a graphical user interface, it transforms system trace and sampling data into reports that present the data in both visual and statistical forms.
Setting Up Your Target Setting up an ARM Linux target These instructions are specific to targets running ARM Linux. Note You can locate all of the files provided by DS-5 by selecting Help → ARM Extras... from the main menu. 2.1.1 Prerequisites You must have the following tools on your host to build the Linux kernel and the gator driver: •...
Page 9
• Enter the following command in your shell to export the cross compiler: export CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-linux-gnueabihf- • To specify that this build is for an ARM architecture, enter the following command in your shell: export ARCH=arm • Enter the following to build the configuration file specific to your platform:...
Page 10
/proc/config.gz | grep CONFIG_PROFILING 2.1.4 Build the gator module To use Streamline with your ARM target, you may build the gator driver on a Linux host or build it locally on your target. DS-5 provides a source archive. Assuming that you have unzipped the file gator-driver.tar.gz...
Page 11
Note requires the library. This file is usually supplied with the Linux gatord libstdc++.so.6 distribution on your target. A copy of is available in the DS-5 Linux example libstdc++.so.6 distribution. 2.1.6 See also Tasks • Setting up an Android target on page 2-6.
Setting up an Android target These instructions are specific to targets running Android. Note You can locate all of the files provided by DS-5 by selecting Help → ARM Extras... from the main menu. 2.2.1 Prepare and build your kernel You must enable certain kernel configuration options to run Streamline.
Page 15
2.2.6 Set capture options to support your Android target In the Capture Options dialog box, opened in the Streamline Data view in Eclipse for DS-5 and enter the ethernet address. If you use the ADB to forward the port, enter...
Using the Streamline Data View The Streamline Data view Much of the functionality of ARM Streamline requires the Streamline Data view. To open the Streamline Data view: Select Window → Show View → Other... Expand the ARM Streamline group. Select Streamline Data.
Page 27
This menu has three options. Select No Energy Data Collection to turn Energy Capture off. When you enable this option, all other Energy Capture options are disabled. Select ARM Energy Probe or National Instruments DAQ to match your energy capture hardware.
Page 28
Use this field to define the path to the executable, necessary to use the caiman.exe ARM Energy Probe to gather power output statistics. The button to the right of this field enables you to search your file system: Figure 4-4 The Tool Path dialog box...
Configuring Counters Opening the Counter Configuration dialog box ARM Streamline uses a default best-fit of hardware performance counters to aid in the analysis of your applications, but you can modify them using the Counter Configuration dialog box, accessed through the Streamline Data view.
The Timeline View About the Timeline view The Timeline view is the first view that you see when ARM Streamline opens a report. It provides you with high level information about the performance of your target during the capture session.
Page 43
If you find Streamline to be slow and unresponsive, change the graphics quality by following these steps: Select Window → Preferences. Use the disclosure control to open DS-5. Select Streamline from the list under DS-5. Uncheck the Use highest quality graphics checkbox.
Page 44
The Energy Offset menu is located in the bottom left hand corner of the Timeline view, next to the Snippets menu. Use it offset power, current, and voltage charts in Captures that include energy data captured using the ARM Energy Probe, so that energy data lines up correctly with the other data in the Timeline view.
CPU Wait-Contention chart handle to change the coloring of the processes and show levels of contention. For more information on how to set up your Linux kernel to provide CPU wait data, see Setting up an ARM Linux target on page 2-2. CPU Wait - I/O Measures how often waiting on I/O caused a task to stop running.
The Timeline View Timeline view toolbar options, contextual menu options, and keyboard shortcuts ARM Streamline provides easy ways to navigate and modify the Timeline view using the toolbar and a variety of contextual menu options and keyboard shortcuts. 6.5.1 Toolbar options...
Page 60
Removes the bookmark from the Timeline view. 6.5.3 Keyboard shortcuts While you can navigate every report in ARM Streamline using the mouse, you can also use keyboard shortcuts. The keyboard shortcuts available for the Timeline view are: Left arrow Moves the Cross Section Marker one bin to the left.
Page 65
7.1.3 Keyboard shortcuts While you can navigate every report in ARM Streamline using the mouse, you can also use keyboard shortcuts. The keyboard shortcuts available for the table views are: Up arrow Moves the current selection up one row.
Chapter 8 The Code View Of all of the views available in ARM Streamline, the Code view provides the highest level of detail. It breaks statistics down by individual line of code and disassembly instruction. The following topics describe the use of the Code view: •...
Page 73
8.1.2 Locating missing source files ARM Streamline automatically locates and displays the source code in the source view. If, however, the source files are not located in the same directory location they were in during compilation, the source view is not populated.
8.2.2 Keyboard shortcuts While you can navigate every report in ARM Streamline using the mouse, you can also use keyboard shortcuts. The keyboard shortcuts available for the table views are: Up arrow Moves the current selection up one row.
Right arrow Moves the current selection to the right. If no function is to the immediate right of the current function box, ARM Streamline chooses the closest available function in the row to the right of the currently selected function.
10.1 Customize reports using Annotate While ARM Streamline provides a large variety of target information, sometimes you require extra context to decipher exactly what the target is doing at certain instances. Streamline Annotate provides a facility for you to add this context to Streamline.
Page 87
Annotate and the Log View Note You can locate all of the files provided by DS-5 by selecting Help → ARM Extras... from the main menu. See the located here for a better understanding of how to call streamline_annotate.h each annotate macro.
You must include this header file in your source code to use them. Note You can locate all of the files provided by DS-5 by selecting Help → ARM Extras... from the main menu. Use the following functions to add bookmarks: ANNOTATE_MARKER() Use this function to add a a red bookmark to the Timeline view without a title.
ANNOTATE_VISUAL Note You can locate all of the files provided by DS-5 by selecting Help → ARM Extras... from the main menu. To use visual annotation, you must: Include the header file located in in your streamline_annotate.h...
Chapter 11 Advanced Customizations ARM Streamline enables you to perform tasks such as creating a report and examining the data available in the report. It enables you to perform these tasks without going to the command line or modifying XML files. However, if you want to customize the data that ARM Streamline collects and change how it is presented to you, or you want to capture data and store it on your target, advanced customizations are required.
11.1 Capturing data on your target Typically, ARM Streamline uses an active network connection to send captured data from the target to the host. If this is not possible because of limitations with your target, you can save the data to local target storage for manual transfer to your host.
This file was provided as an example of how to add custom counters. Note You can locate all of the files provided by DS-5 by selecting Help → ARM Extras... from the main menu. To familiarize yourself with the process of adding your own counters, incorporate the simulated...
Page 105
The combination of ARM Streamline and Energy Probe enables the visualization of power metrics against the software behavior of your target hardware. It provides a better understanding of the static and dynamic behavior of your target system for the purposes of debugging, profiling, and analysis.
12.2 Energy Probe requirements The Energy Probe has the following requirements: • An installation of ARM DS-5 Basic or Professional Edition, version 5.9 or later. • A suitable DS-5 license. • A Streamline-enabled target. For Linux and Android targets, this requires the gator driver and daemon to be installed on the target.
Figure 12-4 Energy Probe in the Timeline view 12.4.1 Adding the caiman application to Streamline To configure Energy Probe, select the ARM Energy Probe option from the Energy Capture drop-down menu and add the path to the application in the Streamline options panel of caiman the run configuration dialog box, under Tool Path.
Chapter 13 Using Streamline on the Command Line Note The feature is only available in the full DS-5 installation. The following topic describes how to use Streamline on the command line: • Opening a Streamline-enabled command prompt or shell on page 13-2 •...
Using Streamline on the Command Line 13.1 Opening a Streamline-enabled command prompt or shell To use Streamline on the command line, open a DS-5 command prompt. On Windows, select Start All Programs → ARM DS-5 → DS-5 Command Prompt. On Linux, add the .../bin location to your environment variable then open a UNIX bash shell.
To create a file, enter your settings and then use the Export... option session.xml in the Capture Options dialog box within DS-5 for Eclipse. For instructions on how to create a file manually, see Capturing data on your target on session.xml...
Streamline may be running on this machine. Please close all instances of Eclipse and try again. Solution: Stop any other running Streamline session and try connecting to the target again. If you cannot find another session, try closing Eclipse for DS-5, then re-starting it. Symptom When using event-based sampling, Streamline fails to find the PMU.