At 2007-05-21T20:52:42+1200, Chris Bayley wrote:
> What I want to do is something like this:
> first extract all the symbols and size information using nm -S,
> then graph the information with an expression in section terms ie
> (.text|.rodata) vs. an expression in symbol terms ie. symbols starting
> ('rtos_[.+]|gui_[.+])
> thus the above example would show me the combined ROM useage of all
> the sybols being with 'rtos_' or 'gui_'.
Not sure if there's anything already out there, I tend to write ad-hoc
scripts for this sort of thing.
> even cooler would be then to present the information in a pie chart
> fromat like 'filelight' or konqueror's 'radial view' does with the
> ability to drill down and look in more detail at a given area.
Just feed the output of your script into GNUPlot or some other plotting tool
for a static visualization. If you want it to be dynamic and zoomable,
you're probably best off to look at the data format that KCachegrind
consumes and make your script output that.
> If you are a programmer and can identify the need I refer to above what
> are the tools you are already using to glen this kind of analysis of
> memory usage in your programs ??
What you're talking about above is not looking at memory usage, just program
code and data size on size. Whether it consumes much memory is an
implementation detail, e.g. on modern UNIX systems the executable is paged
in on demand.
You might also want to look at the massif plugin for Valgrind for looking at
runtime heap usage and the pahole[0] ELF spelunking tools if you're looking
to shrink your data structures.
[0] http://git.kernel.org/?p=linux/kernel/git/acme/pahole.git;a=summary
Cheers,
-mjg
--
Matthew Gregan |/
/| [EMAIL PROTECTED]