This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: gcc - Run Time Memory Capture
- To: "Palmer.Chris" <Chris dot Palmer at IGT dot com>
- Subject: RE: gcc - Run Time Memory Capture
- From: "kodandaraman govindan" <raman dot govindan at wipro dot com>
- Date: Tue, 24 Apr 2001 18:31:20 +0530 (IST)
- Cc: "'raman dot govindan at wipro dot com'" <raman dot govindan at wipro dot com>, bug-gcc at gnu dot org
- References: <C901658C9B18D51187ED00306E065C6E095270@man945nts001.intgame.com>
- Reply-To: raman dot govindan at wipro dot com
Chris,
> has been overwritten. A more useful addition to the gcc suite would be a
> program that can work out the maximum possible stack depth without having to
> run the program. For each function it would need to know the stack used and
> a list of functions called.
Capturing worst case maximum possible stack depth of a program will
be a usefull measure of memory requirement. (without considering
recursion)
Is the following approach to capture Run Time Stack Size for
recursive programs feasible?
gcc -o stackCapture.out -cs "stackCapture.c" ( -cs stands for "Capture
Stack". Probably an
existing option can be
used )
generates a profile information that keeps track of the stack size
of a function(without considering the function calls within it). Let
us say this profile information file is "functionStackSize.dat"
Upon execution of the stackCapture.out, function call trace
is dumped into a file say "functionCall.dat"
Now a utility (modify gprof if feasible) will take functionCall.dat as
input and functionStackSize.dat as reference, to report the Maximum Run
time stack size requirement of the executable for a particular run.
Regards
-raman
--
_______________________________________________________________
Raman Govindan, Software Specialist,
Global R&D Division, Wipro Technologies.
Visit http://netphone.wipro.com (For now Only Wipro Employees)
Email: raman.govindan@wipro.com
Tel: +91-(80)-5364801/07, Ext: 160 (Office)
_______________________________________________________________