Profiling Your Code - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

3.3 Profiling Your Code

3.3.1
Using the Standalone Simulator (load6x) to Profile
3.3.1.1 Using the –g Option to Profile on load6x
In large applications, it makes sense to optimize the most important sections
of code first. You can use the information generated by profiling options to get
started. You can use several different methods to profile your code. These
methods are described below.
There are two methods to using the standalone simulator (load6x) for profiling.
If you are interested in just a profile of all of the functions in your applica-
tion, you can use the –g option in load6x.
If you are interested in just profiling the cycle count of one or two functions,
or if you are interested in a region of code inside a particular function, you
can use calls to the clock( ) function (supported by load6x) to time those
particular functions or regions of code.
Invoking load6x with the –g option runs the standalone simulator in profiling
mode. Source files must be compiled with the –mg profiling option for profiling
to work on the standalone simulator. The profile results are stored in a file
called by the same name as the .out file, but with the .vaa extension.
If you used the –mg profiling option when compiling and linking "example.out",
use the –g option to create a file in which you can view the profiling results. For
example, enter the following on your command line:
load6x –g example.out
Now, you can view the file "example.vaa" to see the results of the profile ses-
sion created with the –mg option on the .out file.
Your new file, "example.vaa" should have been created in the same directory
as the .out file. You can edit the .vaa file with a text editor. You should see some-
thing like this:
Program Name: example.out
Start Address: 00007980 main, at line 1, "demo1.c"
Stop Address: 00007860 exit
Run Cycles: 3339
Profile Cycles: 3339
BP Hits: 11
*******************************************************
Area Name
Count Inclusive Incl–Max Exclusive Excl–Max
CF iir1( )
1
CF vec_mpy1( ) 1
CF mac1( )
1
CF main( )
1
236
236
248
248
168
168
3333
3333
Optimizing C/C++ Code
Profiling Your Code
236
236
248
248
168
168
40
40
3-13

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Questions and answers

Table of Contents