LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Calculating cumulative stack usage
@ 2004-05-20 11:37 Mel Gorman
  0 siblings, 0 replies; only message in thread
From: Mel Gorman @ 2004-05-20 11:37 UTC (permalink / raw)
  To: Linux Kernel Mailing List

I am not on the list at the moment or following the issues except on rare
occasions. I saw on LWN though that people were looking for an automatic
way of calculating cumulative stack usage. Codeviz
(http://www.csn.ul.ie/~mel/projects/codeviz) is able to do something like
this.

Without going into it in a lot of detail, it's a two stage process. Stack
usage is calculated at the same time as generating the call graph with
something like

genfull --pp-stack

Then to generate a call graph with cumulative usage, it would be something
like

gengraph -f somefunc
--pp-cstack="showcumulative=somefunc-someotherfunc,largeusage=3182"

This would generate a callgraph (in postscript) that showed the cumulative
usage in the bubbles between somefunc() and someotherfunc(). It had to be
between two functions because there was no easy way to calculate all
paths.

This would be a fairly manual process though and you would need to have an
idea of where large usage paths might be. However, as the amount of stack
every function uses is in the full.graph file, it would be possible to
identify canditates.

The documentation on how to do this is virtually non-existant because I
did not think there would be users of it but it can be written up.

-- 
Mel Gorman

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-20 11:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-20 11:37 Calculating cumulative stack usage Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).