From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: alinsoar@voila.fr, emacs-devel@gnu.org
Subject: Re: Profiling emacs.
Date: Wed, 25 Mar 2009 13:03:26 -0400 [thread overview]
Message-ID: <jwvhc1h4jsu.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <uzlf9mu3j.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Mar 2009 18:43:12 +0200")
>> 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
next prev parent reply other threads:[~2009-03-25 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-25 16:09 Profiling emacs A. Soare
2009-03-25 16:43 ` Eli Zaretskii
2009-03-25 17:03 ` Stefan Monnier [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-03-25 21:04 A. Soare
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=jwvhc1h4jsu.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=alinsoar@voila.fr \
--cc=eliz@gnu.org \
--cc=emacs-devel@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.
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.