unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Profiling *entire* Emacs
Date: Mon, 31 Mar 2008 22:21:37 +0300	[thread overview]
Message-ID: <ubq4un1ha.fsf@gnu.org> (raw)
In-Reply-To: <f62c80a4-aab3-4d85-8db8-139dd87ddce9@e6g2000prf.googlegroups.com> (message from Nordlöw on Mon, 31 Mar 2008 04:44:26 -0700 (PDT))

> From: =?ISO-8859-1?Q?Nordl=F6w?= <per.nordlow@gmail.com>
> Date: Mon, 31 Mar 2008 04:44:26 -0700 (PDT)
> 
> I looking for a way to profile (instrument) entire Emacs preferrably
> including both built-in- and lisp-functions. Is this possible?

Emacs can be built with profiling on the C level enabled.  You need to
pass the -DPROFILING switch to the compiler.  See the source file
emacs.c for the details; not all platforms support this.

> The
> instrumentation built into Emacs does not seem be built for profiling
> entire Emacs. Is there another way? Or is the only feasable way to
> build Emacs with debug-symbols and run it through gprof or oprofile?

The latter.

> The main reason for desire is that my fancy additional font-locking
> for different classes of operators, braces, function calls, etc are
> very useful but far too slow.

I'd suggest to use elp to profile the Lisp code, then, if you find
that a significant amount of time is spent inside primitives written
in C, profile on the C level.




      parent reply	other threads:[~2008-03-31 19:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 11:44 Profiling *entire* Emacs Nordlöw
2008-03-31 14:41 ` Nordlöw
2008-03-31 19:21 ` Eli Zaretskii [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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ubq4un1ha.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).