unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Memory use analysis
@ 2013-08-13 18:23 mark
  2013-08-19 14:09 ` Ludovic Courtès
  2013-09-07  9:46 ` Andy Wingo
  0 siblings, 2 replies; 3+ messages in thread
From: mark @ 2013-08-13 18:23 UTC (permalink / raw)
  To: guile-user


I'm facing an issue with ballooning memory usage in a progam I'm writing
and having a difficult time tracking down the root cause. The stack
stays small but it uses more and more heap space until the system runs
out of memory.

Is there some kind of tool or method for getting Guile to enumerate what
objects in the heap are considered "live" by the GC? I guess the
conservative GC Guile uses doesn't explicitly keep track of every
object, but I wouldn't mind just being able to see what stuff in the
heap it *thinks* it needs to keep, and then query what kind of SCM
objects they represent.

Thanks

-- 
Mark Witmer



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Memory use analysis
  2013-08-13 18:23 Memory use analysis mark
@ 2013-08-19 14:09 ` Ludovic Courtès
  2013-09-07  9:46 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2013-08-19 14:09 UTC (permalink / raw)
  To: guile-user

Hi,

mark@markwitmer.com skribis:

> Is there some kind of tool or method for getting Guile to enumerate what
> objects in the heap are considered "live" by the GC? I guess the
> conservative GC Guile uses doesn't explicitly keep track of every
> object, but I wouldn't mind just being able to see what stuff in the
> heap it *thinks* it needs to keep, and then query what kind of SCM
> objects they represent.

Not exactly what you’re asking for, but very useful: the (statprof)
module comes with ‘gcprof’, which samples the stack each time the GC
runs (info "(guile) Statprof").  It allows you to see which part of the
programs are allocating the most, roughly.

HTH,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Memory use analysis
  2013-08-13 18:23 Memory use analysis mark
  2013-08-19 14:09 ` Ludovic Courtès
@ 2013-09-07  9:46 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2013-09-07  9:46 UTC (permalink / raw)
  To: mark; +Cc: guile-user

On Tue 13 Aug 2013 20:23, mark@markwitmer.com writes:

> I'm facing an issue with ballooning memory usage in a progam I'm writing
> and having a difficult time tracking down the root cause. The stack
> stays small but it uses more and more heap space until the system runs
> out of memory.

We don't have good tools for this :(

However you can set the GC_PRINT_STATS or GC_PRINT_VERBOSE_STATS
environment variables, and perhaps that is helpful to you.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-07  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 18:23 Memory use analysis mark
2013-08-19 14:09 ` Ludovic Courtès
2013-09-07  9:46 ` Andy Wingo

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 read-only IMAP folder(s) and NNTP newsgroup(s).