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.

Worst Case Stack Analysis



All,

I am trying to get worst case stack usage. I followed steps below:

 1. Updated the stack with known pattern (ex: 0xDEAD)

2. Executed the application for all requirements and possible normal and abnormal scenarios.

3. Finally counted the size of used stack by counting non-known pattern i.e. non 0xDEAD pattern.

The above method does not confirm that the worst case stack path in source code is executed even though

all requirements are covered.

My project is based object oriented concepts; has lot of possibilities with respect to paths, constructors, unction calls through function pointers, polymorphism etc,

This requires large manual effort in analysis.

Please share with me

if any other alternate method to calculate the worst case stack Or

any way above method(dynamic stack analysis) can be substantiated or

tool which can give worst case stack path for C++ preferably free.

Note: My project uses Ti F218 DSP with CCS3,3 IDE

Thanks in Advance.

Ravi Kamath

  • Try call_graph from the cg_xml package.  It creates a static call graph by processing the Dwarf debug information.  Thus, it cannot track through indirect calls.  And indirect calls are more common in C++.  So, I don't know how well it will work for you.  But it is worth a try.

    Thanks and regards,

    -George