Configure and run the GNU profiler.
Syntax
profile [options]
Configure and run the GNU profiler. Profiling must be enabled while building the BSP and application to be profiled.
Options
Option | Description |
---|---|
-freq <sampling-freq>
|
Sampling frequency. |
-scratchaddr <addr>
|
Scratch memory for storing the profiling related data. It needs to be assigned carefully, because it should not overlap with the program sections. |
-out <file-name>
|
Name of the output file for writing the profiling data. This option also runs the profiler and collects the data. If a file name is not specified, profiling data is written to gmon.out. |
Returns
Depends on options used.
-scratchaddr, -freq
: Returns nothing on successful configuration. Error string, in case of error.
-out
: Returns nothing, and generates a file. Error string, in case of error.
Example(s)
profile -freq 10000 -scratchaddr 0
Configure the profiler with a sampling frequency of 10000 and scratch memory at 0x0.
profile -out testgmon.out
Output the profile data in testgmon.out.