Streamline Annotations example - Arm Development Suite

Table of Contents:
This example illustrates the use of Streamline annotations by way of simple instrumented C code.

Purpose and scope

This document describes how to build, run and analyze the Streamline annotation example provided with Arm DS IDE.
This example illustrates the use of Streamline annotations by way of simple instrumented C code. Some different types of annotation - bookmark, text, visual, group and channel annotations - are shown.
This example is intended to be run and analyzed on an Arm Linux hardware target that supports Streamline, though it can also be run only (not analyzed) on a software model such as the FVP model.
The ready-made Streamline capture for this example can be viewed in Streamline using the Import Streamline Sample Captures wizard. To view the ready-made Streamline capture, first launch the Streamline application, then import the capture for this example by selecting File → Import..., Import Streamline Sample Captures, then selecting Linux → Arm DS IDE Annotate Example from the list of sample captures. The capture is added to the Streamline Data view. Double-click on the capture to generate and view an Analysis Report.
Click on the Timeline tab to view the annotations generated by the example:
This example also illustrates the use of group and channel annotations to track some of the functions. These use the ANNOTATE_NAME_GROUP, ANNOTATE_NAME_CHANNEL and ANNOTATE_CHANNEL_COLOR macros. Click on the Log tab to list every message generated by the ANNOTATE statements in the code along with information related to the message.
The master sources for the Streamline annotation C source and header files streamline_annotate.c/.h are provided in install_directory\sw\streamline\gator\annotate\.

Terminology

This document refers to 'host' and 'target' systems. The 'host' system is the Linux or Windows desktop computer that you use for most of your work. The 'target' system is some Arm-based hardware (or model of such hardware) on which the example Arm Linux distribution is running.

Hardware and software requirements

Building this example

A pre-built executable is provided for aarch64 Linux systems.

Building on the command-line

To build on the command-line with the supplied make utility:
Then navigate to ...\Streamline_annotate then type:
make
The usual make rules: clean, all and rebuild are provided in the Makefile.

Building with Eclipse

  1. In the Project Explorer view, select the project you want to build.
  2. Select Project → Build Project.
The supplied Streamline_annotate Eclipse (makefile builder) project is used to build this example.

Running/Debugging the example on a hardware target

This example can be run and debugged on a hardware target by using the supplied Streamline_annotate-gdbserver debug configuration.

Loading the example onto the hardware target manually

Instead of using the supplied Streamline_annotate-gdbserver debug configuration, the example stripped executable annotate can be manually downloaded onto the target, before the example can be run/debugged. To load this file onto the target, you can either:

Running the example manually

Instead of using the supplied Streamline_annotate-gdbserver debug configuration, annotate can be run directly from the target's command-line.
First, navigate to the directory on the target where annotate is located, then execute the following command on the target:
./annotate

Preparing to debug the example with gdbserver manually

Instead of using the supplied Streamline_annotate-gdbserver debug configurations, you can prepare to debug annotate with gdbserver manually.
First, navigate to the directory on the target where annotate is located, then execute the following command on the target:
gdbserver :5000 ./annotate &
Connect from Arm DS IDE Debugger to gdbserver, as described in Configuring a connection to a Linux application using gdbserver in Arm DS IDE Debugger User Guide.

Capturing data and annotations

Assuming the stripped annotation executable has already been loaded to the target, it can now be analyzed with Streamline.
  1. First prepare the Streamline capture configuration in the Streamline Data view: Click on Capture & analysis options and enter a name for the capture session. In the Address field, enter the host name or IP address of the target. Select an Output path to where to save the data. Add the name of the program image to capture - for this example, Streamline must load the debug information from the debug/unstripped version of the image at ${workspace_loc}\Streamline_annotate\annotate. Click Save to return to Streamline Data.
  2. Press Start capture. If the capture configuration is correct, a new analysis file appears in the Streamline Data, with a Stop button within it.
  3. Start the example from the command line with: ./annotate.
  4. After the example finishes, press Stop in Streamline Data. The collected data is then processed for viewing.
  5. When the analysis completes, Streamline automatically opens the Analysis Report. To analyze the captured data again with other settings, click on the Options gear-wheel icon on the right-hand side of the Streamline_annotate Capture Data.
For more information, see Streamline User Guide.

Known issues and troubleshooting

See also: