Re: oafd Leak fixes



On 29 Dec 2000 19:13:01 -0800, Pavel Cisler wrote:
> > 
> > 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.


The problem with this approach though is that I would get the leak
profile for nautilus or whatever else starts up when I start nautilus
(i.e. all the components) - It'd take quite a while to sift through
this.

Ideally, what I would like to is load up oafd on the command-line by
itself (using LD_PRELOAD). Then I would like to run nautilus telling to
utilize the already running oafd (instead of starting up its own). Is
this possible? If not, then I guess I'll just have to sift through the
long memory profile stuff ;)

Regards,
Ali




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