mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Calculating cumulative stack usage
Date: Thu, 20 May 2004 12:37:33 +0100 (IST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0405201228400.16822@skynet> (raw)

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

                 reply	other threads:[~2004-05-20 11:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0405201228400.16822@skynet \
    --to=mel@csn.ul.ie \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®