[Top][All Lists]

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

Re: Profiling emacs.

From: Stefan Monnier
Subject: Re: Profiling emacs.
Date: Wed, 25 Mar 2009 13:03:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

>> Today I tried to compile Emacs including the profiler like so:
>> CFLAGS=-pg LDFLAGS=-pg ./configure --without-x && make
>> Emacs creates a profile 
>> However, when I run ./emacs -Q it creates the same gmon.out at all the 
>> times, even if I run and make something in emacs a few seconds or 1 minute.
>> -rw-r--r-- 1 root root 4625 2009-03-25 11:45 gmon.out
>> Running
>> gprof emacs gmon.out | less
>> it shows just help information, nothing about the symbols of emacs.
>> Could you help me with some idea how to compile emacs includin the profiler?

> This is a commentary from emacs.c:

>   /* Set up for profiling.  This is known to work on FreeBSD,
>      GNU/Linux and MinGW.  It might work on some other systems too.
>      Give it a try and tell us if it works on your system.  To compile
>      for profiling, add -pg to the switches your platform uses in
>      CFLAGS and LDFLAGS.  For example:
>        `make CFLAGS="-pg -g -O -DPROFILING=1" LDFLAGS="-pg -g"'.  */

Yes, IIRC the -DPROFILING is the important one, otherwise only temacs
is profiled.


reply via email to

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