Profiler

From Texas Instruments Wiki
Jump to: navigation, search

Profiler

CCS supports function profiling and code coverage along with simulator events in all simulators except 28x.
Note: target application must be built with minimal debug option turned on for profiling to work
  • ([Project Properties]->Tool Settings->Basic Options->Debug model should be set to symdebug:skeletal or symdebug:dwarf).
  • For RTSC project', use 'debug' configuration ... WHOLE_PROGRAM_DEBUG will not work.

Function Profiling

Function Profiling provides information on number of times functions called, inclusive and exclusive total cycle each functions took to execute and number of simulator events within the functions. The steps below describe the process for setting up and collecting profile data.
NOTE: Not all devices support function profiling. See the this FAQ for more details on which devices support it.

Enable Function Profiling

Open the profiler setup menu
Go to Menu Tools->Profile->Setup Profile Data Collection
Profile setup.jpg
For Help
For help within Code Composer, press the F1 key.
Profile setup window
Create a new profile configuration using create a new configuration icon on the right top corner of profile setup window.


Profile setup2.jpg
Emulation
First activate the view by pressing the Activate button. Next turn on function profiling by checking the Profile all Functions for CPU Cycles box.
Simulator
Select the Profile all Function on a Simulation Device for total cycle or Profile all Function on a Simulation Device for total CPU Cycles
Select simulator events along with function profiling.
Click on properties & select the appropriate events needed.
Function profiling support
interrupt aware profiling, This option will discount the cycles spent in interrupt routine. To enable click on the properties and click on Enable Interrupt Awareness
Profile setup3.jpg
  • Load the application and run.

Function Profiling Result

  • To view the function profiling results Menu Tools->Profile->View Function Profile Results.
Profile output.jpg
  • To view the simulator events across function profiling, click on the drop down menu, where cycle.CPU event show in the profile window.

Note: Due to the Function Profiling feature not being very accurate on C6000 HW, support for it has been disabled in CCSv4. Alternate solutions are to use the profile clock or a trace based solution.

Code Coverage

Code Coverage is supported on CCSv4 & CCSv3.3 as well. Check the following wiki topic: Code Coverage
NOTE: Code Coverage is available on C6x simulators only

Profile Control Points

Profile Control Points are used to enable/disable collection for Function Profiling or Code Coverage. These points can be used to exclude a certain range from getting profiled and vice versa.

The profile control point works similar to a breakpoint and can be set from the Breakpoint view.

  • Click on new breakpoint drop-down menu & select Profile Control Point
Profile control2.jpg
  • Profile Control point menu will pop-up. Specify the address & action. Actions are Pause Profiling , Resume Profiling & Terminate Profiling.
    • Pause Profiling - Pause collecting profile information
    • Resume Profiling - Resume collecting profile information
    • Terminate Profiling - Stops/Terminate collecting profile information
Profile control1.jpg

Profiling with DSS

Function Profiling and Code Coverage can be done using DSS scripts. Check the following wiki topic for more information - Profiling with DSS

Profiling Solutions for C28x Targets

Please visit the following wiki article: Profiling on C28x Targets.

Profiling Solutions for Stellaris CortexM3/M4F Targets

The function profiler is not supported on Stellaris hardware. A solution to obtain profile data is described in this wiki article: Watchpoints for Stellaris in CCS.