This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How do I profile in CCSv5

Other Parts Discussed in Thread: SYSBIOS

I have DM6433 HW, a 560 USB emmulator and CCSv5.

I need to do some profiling but in my setup the menus do nothing, I can't remember ever running the profiler. I used to be able to get a graph of task execution and CPU load but these have stopped working since I attempted a CCS update over the web.

I was wondering if there is a step by step guide of what is needed and what versions of the various libraries work together.

I suppose trumping this is the question of can it work at all, I read some posts on here saying profiling was dropped after v3, that must be a mistake!

If it is not a mistake, has anyone implemented a sampling profiler?

Chris

 

 

  • Hi Chris,

    Chris Thomas said:
    I need to do some profiling but in my setup the menus do nothing, I can't remember ever running the profiler.

    Chris Thomas said:
    I suppose trumping this is the question of can it work at all, I read some posts on here saying profiling was dropped after v3, that must be a mistake!

    If you are alluding to the CCS function profiler, it is not a mistake:

    http://processors.wiki.ti.com/index.php/FAQ_-_CCSv5#Q:_Why_is_function_profiling_not_supported_on_C6000_hardware.3F

    Chris Thomas said:
    I used to be able to get a graph of task execution and CPU load

    You must have a BIOS project. The execution graph and CPU load graph are part of the BIOS RTA tools. 

    Chris Thomas said:
    but these have stopped working since I attempted a CCS update over the web.

    From what version to what version did you update?

    Chris Thomas said:
    If it is not a mistake, has anyone implemented a sampling profiler?

    Other options for profiling on C6000 HW include the profile clock, trace (which I do not believe your device supports) and compiler instrumented profiling. What kind of data are you trying to collect?

    ki

  • I went from v5.2.0.00069 to whatever was on the web last week v5.2.1.x, it killed things like the ROV page which now always reports it is not available, it also took out the execution graphs entirely, the menus do not even drop-down (pop-out).

    Worst of all, and not something you can help with, it took out my SeedDSP emulator so I could not get on with my work.

    I did an uninstall and then reinstalled the old version, this got me back my emulator but ROV etc was still lost. I have gone to the latest SYSBIOS, compiler, RTA etc but that did not get them back.

    Right now I have performance problems and would like to know where my program is spending its time, just the simple traditional spreadsheet view that has the biggest hogs at the top. I don't mind if that data is from instrumentation or sampling, it is really just to find if there are any surprises, things getting called a lot more often than I planned, or where the optimizer has given up on something.

    My code has numerous real-time hardware interfaces so I cannot sensibly use the simulator, for any number crunching type stuff I just move the code over to a PC and optimize it on the desktop.

    I have a logic analyzer and a number of free IO pins so I can already measure time in functions like the profile clock, what is a bit harder is for me to subtract time spent in IRQs and SWIs from the times I see.

    I see the compiler can do profile directed optimization, I always find that sort of thing takes a lot of trouble to get going, is there a way to short cut it, a pragma I could use to mark some functions as critical?

    Ta

    Chris

  • What does the trace analyzer offer, does it not work because of my emmulator or the DM6433 chip?

    If I buy a new emulator or get a 6437 fitted will I be able to profile?

    Chris

  • Chris Thomas said:

    What does the trace analyzer offer, does it not work because of my emmulator or the DM6433 chip?

    If I buy a new emulator or get a 6437 fitted will I be able to profile?

    Unfortunately the various tracing solutions replies on some hw debug modules on the device itself. The DM6433 (or any DM643x) device does not have this support so none of the hw tracing options are available for you.

  • Chris Thomas said:
    I went from v5.2.0.00069 to whatever was on the web last week v5.2.1.x, it killed things like the ROV page which now always reports it is not available, it also took out the execution graphs entirely, the menus do not even drop-down (pop-out).

    oh, you cannot even access the options... are they greyed out or are they just missing completely? Did you try using a new workspace folder?

    Chris Thomas said:
    I see the compiler can do profile directed optimization, I always find that sort of thing takes a lot of trouble to get going, is there a way to short cut it, a pragma I could use to mark some functions as critical?

    It's easy to enable (just a compiler option) but you don't have any control over what it profiles. If you want to learn more, check out section 3.8 of the C6000 compiler user's guide.

    One issue you will run into is that it is a SYS/BIOS program (does not have a clear exit point). You may want to take a peek at the presentation attached to the below thread:

    http://e2e.ti.com/support/development_tools/compiler/f/343/t/206931.aspx

    It is on code coverage but it describes how the compiler based profiler works and the limitations of it.

    Thanks

    ki

  • There seems to be hope, this white paper describes a mechanism to do this. http://processors.wiki.ti.com/index.php/Profiling_on_the_C6000_using_Function_Hooks 

    It seems it is basically a copy of what UIA apparently can do with the 'live' analysis (spruh43b.pdf).

     

    I have tried both now, the white paper seems to get the data ok but the post-processing is not working out for me yet.

    The UIA method just decimates the performance so I can't use it.

     

    Chris