2.10 Performance analysis of the threads application running on ARM® Linux

ARM Streamline is a graphical performance analysis tool. It captures a wide variety of statistics about code running on the target and uses them to generate analysis reports. You can use these to identify problem areas at system, process, and thread level, in addition to hot spots in the code.

Prerequisites

This tutorial uses the threads example application to show how to use Streamline to capture and analyze profiling data from a Linux target. Before capturing the data, ensure that:
  1. You have built the threads application.
  2. You know the IP address or network name of the target. To find the IP address, you can use the ifconfig application in a Linux console. The IP address is denoted by the inet addr.
  3. The Linux kernel on the target is configured for Streamline.
  4. The gator daemon is running on the target. If not, you can install and run gator on the target using the Setup target option in the Streamline Data view.
  5. SSH and gdbserver are running on the target.

Note

For more information about building and running the threads application on a Linux target see the readme.html supplied in the same directory as the source code for the example.

Procedure

  1. Launch Eclipse and open the DS-5 Debug perspective.
  2. In the Remote Systems view, define a connection to the target using the Define a connection to remote system button .
  3. Open the Streamline Data view, from the Window > Show View menu.
  4. In the Streamline Data view, specify the IP address or network name of the target in the Connection field. Alternatively, use the Browse for a target button .
  5. Click on the Capture & analysis options button . In the Program Images section, select the threads image from the workspace, then select Save.
  6. Select Run > Debug configurations... then select the threads-gdbserver-example debug configuration. This configuration downloads the application to the target, starts gdbserver on the target and starts executing the application, stopping at main().
    Depending on the target platform, you might need to select the hard float (threads_hardfp) version of the executable instead of the soft float version (threads). Use the Files tab of the Debug Configurations dialog to change this.
  7. Connect to the target either by clicking on Debug in the Debug Configurations dialog, or by right clicking on the connection in the Debug Control and selecting Connect to target.
  8. The program stops at main(). To start capturing data, click on the Start capture button in the Streamline Data view. Give the capture file a unique name.
  9. Press Continue to continue executing the code.
  10. When the application has terminated, stop the capture using the Stop capture and analyze button .
Streamline automatically analyzes the capture and opens the report in the Timeline view, as shown in the following screenshot. You can regenerate the report for an existing capture file by double-clicking on the capture file in the Streamline Data view.
Figure 2-14 Streamline analysis report for the threads application
Streamline analysis report for the threads application

Related reference
3.6 Examples provided with DS-5
Related information
Using ARM Streamline
Non-Confidential - BetaPDF file icon PDF versionARM DUI0478U
Copyright © 2010-2015 ARM. All rights reserved.