Configure and run the GNU profiler.
Syntax
profile [options]
Configure and run the GNU profiler. The profiling needs to enabled while building 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, as 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 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.