emacs-devel
[Top][All Lists]
Advanced

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

Re: Figuring out what's doing so much allocation


From: Stefan Monnier
Subject: Re: Figuring out what's doing so much allocation
Date: Tue, 20 Mar 2012 23:49:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

> I was running into a problem (now fixed) in which gc was running
> constantly, so I put together the following hack to figure out who was
> doing the allocation.  Set gc-quit-frequency to something like 20, and
> then set debug-on-quit, and you'll get a backtrace every 20th gc.
> It's hardly precise, but often one just needs a hint to suss out
> the cause.

Reminds me that we indeed should add some kind of sampling
based profiling.
The sampling could be "every N μs" or "every N allocated bytes", but it
would be really neat to be able to say "Hmm.. what has my Emacs process
been doing for the last 10s" and get some overview.

It shouldn't be that hard to implement, since we have the Lisp backtrace
readily at hand in a global variable.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]