Re: oafd Leak fixes



> 
> Does anyone by any chance know how to attach a process to memprof? 

Don't think you can attach to an already running process. Memprof and
other leakcheckers like it work by replacing malloc, etc. with patched
versions when the respective binary is being loaded.

> I
> would like to track the memory usage of oafd over a long period of time
> (starting up/shutting down components) but unfortunately, if I try to
> run it from the command-line (using memprof, or LD_PRELOAD tricks)
> whenever I run nautilus or evolution it launches up its own oafd instead
> of using the one already started. Any clues?

You could use the leakchecker in eaze-tools. You could try doing:
export LD_PRELOAD=/gnome/lib/libleakcheck.so
That way every binary your run with the same env should get leakchecked,
including the one you explicitly start and the one that gets launched
later.

You could also try to link oafd directly with the library, that would
take a little bit of hackery though.

If you are using memprof or libleakchecker.so, it is best that you build
the leakchecked binary with -gdwarf-2 instead of -g. There is a bug in
the way gcc generates stabs debugging info that causes the bfd lookup of
some symbols to fail. When that happens you see the wrong routines in a
stack crawl in the leak output.

Pavel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]