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.

Comment out unused code, the rest runs faster on c6727

Hi Everyone,

We have been working on a big project for many years using the c6727 and so far it has been working our pretty well for us.

Lately we have been seeing our processor utilization jump up to 120% of what we need.  The solution has been to comment out some unused code, recompile and the important stuff now runs faster.  We can't figure out why that works.

We are running CCS 5.4 and compiler 7.3.17.  The data is in internal ram and the code is place in external SDRAM.

Thanks for your help.

   Doug

  • Doug,

    Not really enough information for a smart guess. There could be a lot of explanations.

    The one that comes to my mind is program cache size being 32K Bytes. If your unused code pushed some of the used code into an area that had to share cache lines with other code (at the same offset within a 32KB program page), then there could be a cache thrashing condition. Moving that used code to another offset could allow the used code to stay in the cache longer, and that would make it run faster.

    Regards,
    RandyP

  • Randy,

    Thanks for your reply.

    I am not sure what do to avoid this. Are you suggesting grouping the more used code in one section of external RAM and the less used or unused code put into another section?

    Is there a tool to analyze the cache performance?

      Doug

  • Doug,

    Remember it was just a guess, one of many that could fit your description.

    I recommend trying to figure out if this is the problem, but I do not have a suggestion of how to do that. Only you know your code well enough to do that.

    Grouping can be effective for handling cache problems. There used to be cache tuning tools, but I have no experience with them. You can look through the CCS tutorials and help files, and you can search the TI Wiki Pages for "cache tuning" (no quotes) to see if there is anything out there.

    Regards,
    RandyP