comp.lang.ada
 help / color / mirror / Atom feed
* Tool to calculate the stack size
@ 2004-07-07 19:21 Vincent Smeets
  2004-07-08 17:13 ` Niklas Holsti
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Smeets @ 2004-07-07 19:21 UTC (permalink / raw)


Hallo,

Is there a tool to calculate the maximum stack size for an Ada program and
it's tasks?

I am developing a real time Ada program. One of the requirements on the code
is that for every task, the storage_size has to be defined. (for
T'Storage_Size use <some value>;) Because recursion isn't allowed, it is
given that the tasks will always have enough space.

The first phase of the development is done on a Sun Solaris with a GNAT 3.14
host compiler. After the program has been tested, it will be compiled by a
GNAT 3.14 cross compiler for VxWorks/PowerPC where it will be tested again.

Is there a tool to calculate the maximum stack size? I have looked at the
compiler and seen some options but no one gave the ideal output.
I can use the option "-save-temps" and search the assembler files for the
sparc-statement "save %sp,...,%sp" where the stack pointer is decremented to
allocate space for the local variables. After that, I have to find the call
tree and add all these values to get the maximum stack size.
I have seen that the MIPS-version has an option "-mstats". The documentation
says that it will output the needed stack space for every compiled function.
The problem is that I don't compile for MIPS and so I don't have this option
available.
I would like to have the call tree for every task and automatically
calculate
and summarize the stack size for every function called.


Vincent Smeets






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tool to calculate the stack size
  2004-07-07 19:21 Tool to calculate the stack size Vincent Smeets
@ 2004-07-08 17:13 ` Niklas Holsti
  0 siblings, 0 replies; 2+ messages in thread
From: Niklas Holsti @ 2004-07-08 17:13 UTC (permalink / raw)


Vincent Smeets wrote:
> Hallo,
> 
> Is there a tool to calculate the maximum stack size for an Ada program and
> it's tasks?

Perhaps the tool at http://www.absint.com/stackanalyzer/ can help you.

Niklas Holsti
Tidorum Ltd

niklas holsti tidorum fi
       .      @       .




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-08 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-07 19:21 Tool to calculate the stack size Vincent Smeets
2004-07-08 17:13 ` Niklas Holsti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox