all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jim Blandy <jimb@red-bean.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Figuring out what's doing so much allocation
Date: Tue, 20 Mar 2012 23:49:11 -0400	[thread overview]
Message-ID: <jwvfwd2ipoy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAHgb+0nidz985uxRw0iZr7ttR3-TUxQo1jO5+fPjhWAKM_C+DQ@mail.gmail.com> (Jim Blandy's message of "Fri, 10 Feb 2012 11:22:40 -0800")

> 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	other threads:[~2012-03-21  3:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10 19:22 Figuring out what's doing so much allocation Jim Blandy
2012-03-21  3:49 ` Stefan Monnier [this message]

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=jwvfwd2ipoy.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=jimb@red-bean.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.