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.
This tutorial uses the threads example application to show how to use Streamline to capture and analyze profiling data from a Linux target. threads is one of the ARMv7 Linux application examples that are provided with DS-5. Before capturing the data, ensure that:
You have built the threads application.
You know the IP address or network name of the target. To find the IP address, you can use the
ifconfigapplication in a Linux console. The IP address is denoted by the inet addr.
The Linux kernel on the target is configured to work with Streamline.
The gator daemon,
gatord, is running on the target. If not, the simplest way to install and run
gatordon the target is to use the Setup Target... button in the Connection Browser dialog in the Streamline Data view.
gdbserverare running on the target.
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.
For more information about how to configure your target for Streamline, see the Streamline User Guide.
- Launch Eclipse for DS-5 and open the DS-5 Debug perspective.
- In the Remote Systems view, define a connection to the target using the Define a connection to remote system button .
- Launch the Streamline application.
Specify the IP address or network name of the target in the Address field. Alternatively, use the
Browse for a target button, as shown
in the following screenshot:
Figure 4-27 Streamline Data view
- Click the Capture & analysis options button. In the Program Images section, select the threads image from the workspace, then select Save.
In Eclipse for DS-5, select Run > Debug configurations... then select the
threads-gdbserverdebug configuration. This configuration downloads the application to the target, starts
gdbserveron the target and starts executing the application, stopping at
- 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.
The program stops at
main(). To start capturing data, switch to the Streamline application and click the Start capture button . Give the capture file a unique name. The Live view opens in Streamline, displaying the capture data in real time.
- In Eclipse for DS-5, press Continue to continue executing the code.
- When the application terminates, stop the capture in Streamline by clicking the Stop capture and analyze button .
Streamline automatically analyzes the capture data and produces a report, which it displays in the Timeline view, as shown in the following screenshot:
Figure 4-28 Streamline analysis report for the threads application