Analyzing Program Performance With Sun WorkShop

Starting LoopReport

When it starts up, LoopReport expects to be given the name of your program. Type loopreport and the name of the program (an executable) you want examined.


% loopreport program

You can also start LoopReport with no file specified. However, if you invoke LoopReport without giving it the name of a program, it looks for a file named a.out in the current working directory.


% loopreport > a.out.loopreport

You can also direct the output into a file, or pipe it into another command:


% loopreport program > program.loopreport
% loopreport program | more

Timing File

LoopReport also reads the timing file associated with your program. The timing file is created when you use the -zlp option, and contains information about loops. Typically, this file has a name of the format program.looptimes, and is found in the same directory as your program.

However, there are four ways to specify the location of a timing file. LoopReport chooses a timing file according to the rules listed below.

Figure 3-4 Sample Loop Report

Graphic

Fields in the Loop Report

The descriptions below apply equally to LoopTool's "Create Report" output and LoopReport's output.

The loop report contains the following information:

The first loop is entered once, and it iterates 17 times. The second loop is entered 17 times, and it iterates 17*50 = 850 times.