all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Profiling *entire* Emacs
@ 2008-03-31 11:44 Nordlöw
  2008-03-31 14:41 ` Nordlöw
  2008-03-31 19:21 ` Eli Zaretskii
  0 siblings, 2 replies; 3+ messages in thread
From: Nordlöw @ 2008-03-31 11:44 UTC (permalink / raw)
  To: help-gnu-emacs

Hey, there!

I looking for a way to profile (instrument) entire Emacs preferrably
including both built-in- and lisp-functions. Is this possible? 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 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.

Thanks in advance,
Nordlöw


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Profiling *entire* Emacs
  2008-03-31 11:44 Profiling *entire* Emacs Nordlöw
@ 2008-03-31 14:41 ` Nordlöw
  2008-03-31 19:21 ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Nordlöw @ 2008-03-31 14:41 UTC (permalink / raw)
  To: help-gnu-emacs

On 31 Mar, 13:44, Nordlöw <per.nord...@gmail.com> wrote:
> Hey, there!
>
> I looking for a way to profile (instrument) entire Emacs preferrably
> including both built-in- and lisp-functions. Is this possible? 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 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.
>
> Thanks in advance,
> Nordlöw

At least for the x86 port couldn't we use a uint64_t performance
counter (using the x86 instruction rdtsc) that measures the number of
clock cycles the CPU has spent inside the function?

/Nordlöw


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Profiling *entire* Emacs
  2008-03-31 11:44 Profiling *entire* Emacs Nordlöw
  2008-03-31 14:41 ` Nordlöw
@ 2008-03-31 19:21 ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2008-03-31 19:21 UTC (permalink / raw)
  To: help-gnu-emacs

> 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.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-31 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-31 11:44 Profiling *entire* Emacs Nordlöw
2008-03-31 14:41 ` Nordlöw
2008-03-31 19:21 ` Eli Zaretskii

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.