* Profiling emacs.
@ 2009-03-25 16:09 A. Soare
2009-03-25 16:43 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: A. Soare @ 2009-03-25 16:09 UTC (permalink / raw)
To: Emacs Dev [emacs-devel]
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?
____________________________________________________
L’inoubliable Alain Bashung est à l’écoute sur Musiline Voila ! http://musiline.voila.fr/player/createtag/935908?creationtype=3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Profiling emacs.
2009-03-25 16:09 A. Soare
@ 2009-03-25 16:43 ` Eli Zaretskii
2009-03-25 17:03 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2009-03-25 16:43 UTC (permalink / raw)
To: alinsoar; +Cc: emacs-devel
> From: "A. Soare" <alinsoar@voila.fr>
> Date: Wed, 25 Mar 2009 17:09:38 +0100 (CET)
>
> 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"'. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Profiling emacs.
2009-03-25 16:43 ` Eli Zaretskii
@ 2009-03-25 17:03 ` Stefan Monnier
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-03-25 17:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: alinsoar, emacs-devel
>> 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.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Profiling emacs.
@ 2009-03-25 21:04 A. Soare
0 siblings, 0 replies; 4+ messages in thread
From: A. Soare @ 2009-03-25 21:04 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Eli Zaretskii, emacs-devel
> `make CFLAGS="-pg -g -O -DPROFILING=1" LDFLAGS="-pg -g"'. */
>
> Yes, IIRC the -DPROFILING is the important one, otherwise only temacs
> is profiled.
>
Thanks. The profiler works now nice.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-25 21:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-25 21:04 Profiling emacs A. Soare
-- strict thread matches above, loose matches on Subject: below --
2009-03-25 16:09 A. Soare
2009-03-25 16:43 ` Eli Zaretskii
2009-03-25 17:03 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).