From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesc Rocher Newsgroups: gmane.emacs.devel Subject: Emacs profile & coverage Date: Sun, 1 Mar 2009 20:25:46 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636c5a5153cdf09046413abcd X-Trace: ger.gmane.org 1235935575 10953 80.91.229.12 (1 Mar 2009 19:26:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Mar 2009 19:26:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 01 20:27:30 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LdrJw-00088S-BL for ged-emacs-devel@m.gmane.org; Sun, 01 Mar 2009 20:27:29 +0100 Original-Received: from localhost ([127.0.0.1]:33112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdrIb-00045d-8q for ged-emacs-devel@m.gmane.org; Sun, 01 Mar 2009 14:26:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdrIN-0003sO-Nz for emacs-devel@gnu.org; Sun, 01 Mar 2009 14:25:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdrIM-0003qI-2w for emacs-devel@gnu.org; Sun, 01 Mar 2009 14:25:50 -0500 Original-Received: from [199.232.76.173] (port=48200 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdrIL-0003py-TB for emacs-devel@gnu.org; Sun, 01 Mar 2009 14:25:49 -0500 Original-Received: from mail-fx0-f172.google.com ([209.85.220.172]:44550) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LdrIL-0000yM-8U for emacs-devel@gnu.org; Sun, 01 Mar 2009 14:25:49 -0500 Original-Received: by fxm20 with SMTP id 20so1731746fxm.42 for ; Sun, 01 Mar 2009 11:25:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=BWQCXeEL9xjhKoQb4tyMm5BLJyYTcK2uDHDTFPKoe/g=; b=TsCeSKwqa0c6nA8o0OMs9gDXfYah4xC4nrNKOIar7ild0rzyVtj9+gnugBzsPysYn2 7oFJqVUeyhQ4zJJ/s2VMeBg5/pSvAi5Q3vHwYGqlB9rDurXYrpoGxMT3cARWysWsWeBH 19jx7BaY5C7zVXjXaMPnEdT8rYU5Lt6yKXPZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=KzoxbMJHZUgBrj1jcwbHcLfC8Gw4Xcjvh240hIePO8fVHdHtyOGeI5tof7z16NA5Na QeB++e5TuIDMvQpqVxyHnsG4siQe1AxZz8wDODIy24K1n+fyKMBCcC6JgjXao3LHjnAd Hwwr+25U/tg4QnzfGmleCnMmr/AADeiwbWfEU= Original-Received: by 10.223.118.15 with SMTP id t15mr5259170faq.101.1235935546891; Sun, 01 Mar 2009 11:25:46 -0800 (PST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109388 Archived-At: --001636c5a5153cdf09046413abcd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I've tried to compile the latest CVS emacs version with profiling and coverage. Under Fedora-10_x86_64 that's the environment used: gcc --version = 4.3.2 20081105 (Red Hat 4.3.2-7) ld -version = 2.18.50.0.9-8.fc10 20080822 autoconf --version = 2.63 automake --version = 1.10.1 glibc 2.9 CFLAGS="-pg -coverage" LDFLAGS="-pg -coverage" The command "./configure --prefix=/bla/bla" works fine. Then, "make" starts to compile, failing at gcc -nostdlib `./prefix-args -Xlinker -z nocombreloc` -pg -coverage -Wl,-znocombreloc -o temacs pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o window.o charset.o coding.o category.o ccl.o character.o chartab.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o gtkutil.o dbusbind.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o syntax.o unexelf.o bytecode.o process.o callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o textprop.o composite.o md5.o xfont.o ftfont.o xftfont.o ftxfont.o terminfo.o lastfile.o vm-limit.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lpthread -lSM -lICE -ltiff -ljpeg -lpng -lz -lm -lgif -lXpm -lX11 -lXft -lXrender -lfontconfig -lfreetype -lX11 -lasound -lrsvg-2 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -L/lib64 -ldbus-1 -lgpm -lncurses -lm -lgcc -lc -lgcc /usr/lib64/crtn.o with the message /usr/lib/gcc/x86_64-redhat-linux/4.3.2/libgcov.a(_gcov.o): In function `__gcov_init': (.text+0x148): undefined reference to `atexit' collect2: ld returned 1 exit status make[1]: *** [temacs] Error 1 Q1: Is this a problem of the Fedora-10 environment? Q2: It is reproducible in other environments? The only way I've found to get 'temacs' compiled is by manually cd-ing 'src' directory and issuing the command gcc `./prefix-args -Xlinker -z nocombreloc` -pg -coverage -Wl,-znocombreloc -o temacs pre-crt0.o dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o window.o charset.o coding.o category.o ccl.o character.o chartab.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o gtkutil.o dbusbind.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o syntax.o unexelf.o bytecode.o process.o callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o textprop.o composite.o md5.o xfont.o ftfont.o xftfont.o ftxfont.o terminfo.o lastfile.o vm-limit.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lpthread -lSM -lICE -ltiff -ljpeg -lpng -lz -lm -lgif -lXpm -lX11 -lXft -lXrender -lfontconfig -lfreetype -lX11 -lasound -lrsvg-2 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -L/lib64 -ldbus-1 -lgpm -lncurses -lm -lgcc -lc -lgcc That is, I had to remove '/usr/lib64/crt[1in].o' files and the flag '-nostdlib'. Ok then, once I had 'temacs' compiled, I continued with the 'make' command from the top directory. Then I get the error: `/bin/pwd`/temacs --batch --load loadup bootstrap make[1]: *** [bootstrap-emacs] Profiling timer expired At this point there's no way to continue unless you edit 'emacs.c' and add this patch: diff -c -2 -r1.462 emacs.c *** src/emacs.c 1 Mar 2009 12:40:39 -0000 1.462 --- src/emacs.c 1 Mar 2009 19:08:32 -0000 *************** *** 787,790 **** --- 787,792 ---- main (int argc, char **argv) { + struct itimerval itval = {{0, 0}, {0, 0}}; + setitimer (ITIMER_PROF, &itval, NULL); #if GC_MARK_STACK Lisp_Object dummy; Q3: Should this patch progress to CVS? Compiled again 'temacs' and continued with the make process, finishing without problems. 'make install' and run 'emacs' without problems, obtaining all information files for gprof and gcov. -- Francesc Rocher --001636c5a5153cdf09046413abcd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I've tried to compile the latest CVS emacs version with = profiling and
coverage. Under Fedora-10_x86_64 that's the environmen= t used:

=A0=A0 gcc --version =3D 4.3.2 20081105 (Red Hat 4.3.2-7)=A0=A0 ld -version =3D 2.18.50.0.9-8.fc10 20080822
=A0=A0 autoconf --version =3D 2.63
=A0=A0 automake --version =3D 1.10.1<= br>=A0=A0 glibc 2.9

=A0=A0 CFLAGS=3D"-pg -coverage"
=A0= =A0 LDFLAGS=3D"-pg -coverage"


The command "./conf= igure --prefix=3D/bla/bla" works fine. Then, "make"
starts to compile, failing at

=A0=A0 gcc -nostdlib `./prefix-args -X= linker -z nocombreloc` -pg -coverage
=A0=A0=A0=A0=A0=A0 -Wl,-znocombrelo= c -o temacs pre-crt0.o /usr/lib64/crt1.o
=A0=A0=A0=A0=A0=A0 /usr/lib64/c= rti.o dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o
=A0=A0=A0=A0=A0=A0 window.o charset.o coding.o category.o ccl.o character.o= chartab.o
=A0=A0=A0=A0=A0=A0 cm.o term.o terminal.o xfaces.o xterm.o xf= ns.o xselect.o xrdb.o
=A0=A0=A0=A0=A0=A0 fontset.o xsmfns.o fringe.o ima= ge.o gtkutil.o dbusbind.o emacs.o
=A0=A0=A0=A0=A0=A0 keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.= o insdel.o
=A0=A0=A0=A0=A0=A0 marker.o minibuf.o fileio.o dired.o filemo= de.o cmds.o casetab.o
=A0=A0=A0=A0=A0=A0 casefiddle.o indent.o search.o = regex.o undo.o alloc.o data.o doc.o
=A0=A0=A0=A0=A0=A0 editfns.o callint.o eval.o floatfns.o fns.o font.o print= .o lread.o
=A0=A0=A0=A0=A0=A0 syntax.o unexelf.o bytecode.o process.o ca= llproc.o region-cache.o
=A0=A0=A0=A0=A0=A0 sound.o atimer.o doprnt.o str= ftime.o intervals.o textprop.o
=A0=A0=A0=A0=A0=A0 composite.o md5.o xfont.o ftfont.o xftfont.o ftxfont.o t= erminfo.o
=A0=A0=A0=A0=A0=A0 lastfile.o vm-limit.o -lgtk-x11-2.0 -lgdk-x= 11-2.0 -latk-1.0 -lgio-2.0
=A0=A0=A0=A0=A0=A0 -lpangoft2-1.0 -lgdk_pixbu= f-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0
=A0=A0=A0=A0=A0=A0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgl= ib-2.0
=A0=A0=A0=A0=A0=A0 -lpthread -lSM -lICE -ltiff -ljpeg -lpng -lz -= lm -lgif -lXpm -lX11
=A0=A0=A0=A0=A0=A0 -lXft -lXrender -lfontconfig -lf= reetype -lX11 -lasound -lrsvg-2
=A0=A0=A0=A0=A0=A0 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lg= lib-2.0
=A0=A0=A0=A0=A0=A0 -L/lib64 -ldbus-1 -lgpm -lncurses -lm -lgcc -= lc -lgcc
=A0=A0=A0=A0=A0=A0 /usr/lib64/crtn.o

with the message
=A0=A0 /usr/lib/gcc/x86_64-redhat-linux/4.3.2/libgcov.a(_gcov.o): In f= unction `__gcov_init':
=A0=A0 (.text+0x148): undefined reference to `atexit'
=A0=A0 collect= 2: ld returned 1 exit status
=A0=A0 make[1]: *** [temacs] Error 1

Q1: Is this a problem of the Fedora-10 environment?
Q2: It is repro= ducible in other environments?


The only way I've found to get 'temacs' compiled is by = manually cd-ing 'src'
directory and issuing the command

= =A0=A0 gcc `./prefix-args -Xlinker -z nocombreloc` -pg -coverage
=A0=A0= =A0=A0=A0=A0 -Wl,-znocombreloc -o temacs pre-crt0.o dispnew.o frame.o scrol= l.o
=A0=A0=A0=A0=A0=A0 xdisp.o menu.o xmenu.o window.o charset.o coding.o categ= ory.o ccl.o
=A0=A0=A0=A0=A0=A0 character.o chartab.o cm.o term.o termina= l.o xfaces.o xterm.o xfns.o
=A0=A0=A0=A0=A0=A0 xselect.o xrdb.o fontset.= o xsmfns.o fringe.o image.o gtkutil.o
=A0=A0=A0=A0=A0=A0 dbusbind.o emacs.o keyboard.o macros.o keymap.o sysdep.o= buffer.o
=A0=A0=A0=A0=A0=A0 filelock.o insdel.o marker.o minibuf.o file= io.o dired.o filemode.o
=A0=A0=A0=A0=A0=A0 cmds.o casetab.o casefiddle.o= indent.o search.o regex.o undo.o alloc.o
=A0=A0=A0=A0=A0=A0 data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o= font.o
=A0=A0=A0=A0=A0=A0 print.o lread.o syntax.o unexelf.o bytecode.o= process.o callproc.o
=A0=A0=A0=A0=A0=A0 region-cache.o sound.o atimer.o= doprnt.o strftime.o intervals.o
=A0=A0=A0=A0=A0=A0 textprop.o composite.o md5.o xfont.o ftfont.o xftfont.o = ftxfont.o
=A0=A0=A0=A0=A0=A0 terminfo.o lastfile.o vm-limit.o -lgtk-x11-= 2.0 -lgdk-x11-2.0 -latk-1.0
=A0=A0=A0=A0=A0=A0 -lgio-2.0 -lpangoft2-1.0 = -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo
=A0=A0=A0=A0=A0=A0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmod= ule-2.0
=A0=A0=A0=A0=A0=A0 -lglib-2.0 -lpthread -lSM -lICE -ltiff -ljpeg= -lpng -lz -lm -lgif
=A0=A0=A0=A0=A0=A0 -lXpm -lX11 -lXft -lXrender -lfo= ntconfig -lfreetype -lX11 -lasound
=A0=A0=A0=A0=A0=A0 -lrsvg-2 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodul= e-2.0
=A0=A0=A0=A0=A0=A0 -lglib-2.0 -L/lib64 -ldbus-1 -lgpm -lncurses -l= m -lgcc -lc -lgcc

That is, I had to remove '/usr/lib64/crt[1in].= o' files and the flag '-nostdlib'. Ok
then, once I had 'temacs' compiled, I continued with the 'make&= #39; command from
the top directory. Then I get the error:

=A0=A0= `/bin/pwd`/temacs --batch --load loadup bootstrap
=A0=A0 make[1]: *** [= bootstrap-emacs] Profiling timer expired

At this point there's no way to continue unless you edit 'emacs= .c' and add
this patch:

=A0=A0 diff -c -2 -r1.462 emacs.c
= =A0=A0 *** src/emacs.c=A0=A0=A0 1 Mar 2009 12:40:39 -0000=A0=A0=A0 1.462=A0=A0 --- src/emacs.c=A0=A0=A0 1 Mar 2009 19:08:32 -0000
=A0=A0 ***************
=A0=A0 *** 787,790 ****
=A0=A0 --- 787,792 ---= -
=A0=A0=A0=A0 main (int argc, char **argv)
=A0=A0=A0=A0 {
=A0=A0 = +=A0=A0=A0 struct itimerval itval =3D {{0, 0}, {0, 0}};
=A0=A0 +=A0=A0= =A0 setitimer (ITIMER_PROF, &itval, NULL);
=A0=A0=A0=A0 #if GC_MARK_STACK
=A0=A0=A0=A0=A0=A0 Lisp_Object dummy;
=

Q3: Should this patch progress to CVS?


Compiled again &#= 39;temacs' and continued with the make process, finishing
without pr= oblems. 'make install' and run 'emacs' without problems, ob= taining
all information files for gprof and gcov.


-- Francesc Rocher
=
--001636c5a5153cdf09046413abcd--