git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco Costalba" <mcostalba@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: "Nicolas Pitre" <nico@cam.org>,
	david@lang.hm, "Jon Smirl" <jonsmirl@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: RAM consumption when working with the gcc repo
Date: Sat, 8 Dec 2007 20:12:07 +0100	[thread overview]
Message-ID: <e5bfff550712081112xf34eb1cua95da3f9397030f0@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0712081153500.27959@racer.site>

On Dec 8, 2007 12:54 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> >
> > BTW does exist a tool to profile memory consumption by each source level
> > struct / vector/ or any other data container?
> >
> > Valgrind checks mainly memory leaks, callgrind gives profiling
> > information in terms of call graphs and times/cycles consumed by each
> > function.
>
> Have you looked at Massif (also part of Valgrind)?
>

Only very quickly, so probably I've missed something, but anyway
that's my comment on Massiv:

- Interesting output is in html format, graph is nice but gives very
general info.

- The tool mainly tracks who called malloc and friends also going back
in the stack frame (in my box if I try to set stack deep at 4 instead
of default 3 program crashes)

- Does not seem to give information regarding the structures where
memory is allocated, only the function names that allocate directly or
indirectly the memory. Nothing like

struct my_data has 34.256 instantiations
struct stuff has 2.456 instantiations


- Relation between memory and time of allocation is IMHO a little bit
confusing, it's like a parameter obtained from multipling allocated
bytes x time, not very useful.

- Regarding the previous point, it seems missing a way to
trigger/snapshotting the memory map in terms of source level
structures used by the application in a given time, triggable through
code.

Just to be clear, the much better callgrind tool allows to insert in
the code the macros

CALLGRIND_START_INSTRUMENTATION and
CALLGRIND_STOP_INSTRUMENTATION

that start/stop recording of events in the code ranges specified by
the developer. What it seems to be missing in massif it's a macro like

MASSIV_SNAPSHOT_MEM_MAP

to be used _where_ developer needs and that gives information on heap
allocation in terms of source level entities that *use* that memory,
not low level addresses or allocator functions.


Thanks
Marco

  reply	other threads:[~2007-12-08 19:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 20:07 RAM consumption when working with the gcc repo Jon Smirl
2007-12-07 21:24 ` david
2007-12-07 20:36   ` Marco Costalba
2007-12-07 20:46   ` Nicolas Pitre
2007-12-07 21:23     ` Jon Smirl
2007-12-07 21:25     ` Marco Costalba
2007-12-08 11:54       ` Johannes Schindelin
2007-12-08 19:12         ` Marco Costalba [this message]
2007-12-07 21:27     ` Jon Smirl
2007-12-07 21:39     ` Jon Smirl
2007-12-07 21:50     ` Jon Smirl
2007-12-08 17:24     ` Martin Koegler
2007-12-07 21:39 ` Jeff King
2007-12-07 21:40   ` Jeff King
2007-12-07 21:43   ` Jon Smirl

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=e5bfff550712081112xf34eb1cua95da3f9397030f0@mail.gmail.com \
    --to=mcostalba@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=david@lang.hm \
    --cc=git@vger.kernel.org \
    --cc=jonsmirl@gmail.com \
    --cc=nico@cam.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;
as well as URLs for NNTP newsgroup(s).