From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: data-tests-logcount Failure Date: Tue, 24 Oct 2017 09:02:34 -0700 Organization: UCLA Computer Science Department Message-ID: <7b839a97-dee5-2930-4c6d-a3c36a91a235@cs.ucla.edu> References: <87o9owg8ow.fsf@yandex.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508861010 7026 195.159.176.226 (24 Oct 2017 16:03:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Oct 2017 16:03:30 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 Cc: Mark Oteiza , emacs-devel@gnu.org To: Colin Baxter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 24 18:03:23 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e71fX-0007rr-HF for ged-emacs-devel@m.gmane.org; Tue, 24 Oct 2017 18:03:07 +0200 Original-Received: from localhost ([::1]:44524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e71fe-0006XP-Po for ged-emacs-devel@m.gmane.org; Tue, 24 Oct 2017 12:03:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e71fO-0006Tv-Ag for emacs-devel@gnu.org; Tue, 24 Oct 2017 12:03:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e71fI-00070J-Gn for emacs-devel@gnu.org; Tue, 24 Oct 2017 12:02:58 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53872) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e71fI-0006wy-6U for emacs-devel@gnu.org; Tue, 24 Oct 2017 12:02:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B75DA160EE0; Tue, 24 Oct 2017 09:02:43 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id d4krC7OJTEnQ; Tue, 24 Oct 2017 09:02:37 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DECCB160EE7; Tue, 24 Oct 2017 09:02:37 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aUeycJMpGecB; Tue, 24 Oct 2017 09:02:37 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C3A02160EE4; Tue, 24 Oct 2017 09:02:37 -0700 (PDT) In-Reply-To: <87o9owg8ow.fsf@yandex.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219722 Archived-At: On 10/24/2017 03:07 AM, Colin Baxter wrote: > FAILED data-tests-logcount What are the values of (logcount 9727) and (logcount 9999) on your=20 platform? They should be 11 and 8, respectively.Are there more details=20 about this in the file test/src/data-tests.log? How did you invoke 'configure'? What is the output of 'gcc --version',=20 and of 'cat /proc/cpuinfo'? Can you run Emacs under GDB and put a breakpoint on the Flogcount=20 function, and execute the above two Elisp calls while single-stepping=20 through Flogcount, and also disassemble Flogcount? I did that on Fedora=20 26 x86-64 on AMD Phenom II X4 910e, configured with=20 'PKG_CONFIG_LIBDIR=3D/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure=20 CC=3D"/usr/bin/gcc -m32 -march=3Dnative -fsanitize=3Dundefined=20 -static-libubsan" --enable-gcc-warnings --without-imagemagick=20 --with-modules', and got the following. What do you get when you try the=20 same thing with your configuration? =C2=A0=C2=A0=C2=A0 $ gdb bootstrap-emacs =C2=A0=C2=A0=C2=A0 (gdb) source .gdbinit =C2=A0=C2=A0=C2=A0 (gdb) b Flogcount =C2=A0=C2=A0=C2=A0 (gdb) r -Q =C2=A0=C2=A0=C2=A0 [In the *scratch* buffer, type "(logcount 9727) C-j".= ] =C2=A0=C2=A0=C2=A0 Breakpoint 3, Flogcount (value=3Dmake_number(9727)) a= t data.c:3078 =C2=A0=C2=A0=C2=A0 (gdb) bt =C2=A0=C2=A0=C2=A0 #0=C2=A0 Flogcount (value=3Dmake_number(9727)) at dat= a.c:3078 =C2=A0=C2=A0=C2=A0 ... =C2=A0=C2=A0=C2=A0 (gdb) disas =C2=A0=C2=A0=C2=A0 Dump of assembler code for function Flogcount: =C2=A0=C2=A0=C2=A0 =3D> 0x08184080 <+0>:=C2=A0=C2=A0=C2=A0 sub=C2=A0=C2=A0= =C2=A0 $0xc,%esp =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x08184083 <+3>:=C2=A0=C2=A0=C2=A0 mov=C2= =A0=C2=A0=C2=A0 0x14(%esp),%edx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x08184087 <+7>:=C2=A0=C2=A0=C2=A0 mov=C2= =A0=C2=A0=C2=A0 0x10(%esp),%eax =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x0818408b <+11>:=C2=A0=C2=A0=C2=A0 mov=C2= =A0=C2=A0=C2=A0 %edx,%ecx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x0818408d <+13>:=C2=A0=C2=A0=C2=A0 and=C2= =A0=C2=A0=C2=A0 $0x3,%ecx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x08184090 <+16>:=C2=A0=C2=A0=C2=A0 cmp=C2= =A0=C2=A0=C2=A0 $0x2,%ecx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x08184093 <+19>:=C2=A0=C2=A0=C2=A0 jne=C2= =A0=C2=A0=C2=A0 0x81840b2 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x08184095 <+21>:=C2=A0=C2=A0=C2=A0 mov=C2= =A0=C2=A0=C2=A0 %edx,%ecx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x08184097 <+23>:=C2=A0=C2=A0=C2=A0 sar=C2= =A0=C2=A0=C2=A0 $0x1f,%edx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x0818409a <+26>:=C2=A0=C2=A0=C2=A0 sar=C2= =A0=C2=A0=C2=A0 $0x2,%ecx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x0818409d <+29>:=C2=A0=C2=A0=C2=A0 xor=C2= =A0=C2=A0=C2=A0 %edx,%ecx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x0818409f <+31>:=C2=A0=C2=A0=C2=A0 popc= nt %ecx,%ecx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840a3 <+35>:=C2=A0=C2=A0=C2=A0 lea=C2= =A0=C2=A0=C2=A0 0x2(,%ecx,4),%edx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840aa <+42>:=C2=A0=C2=A0=C2=A0 mov=C2= =A0=C2=A0=C2=A0 %edx,(%eax) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840ac <+44>:=C2=A0=C2=A0=C2=A0 add=C2= =A0=C2=A0=C2=A0 $0xc,%esp =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840af <+47>:=C2=A0=C2=A0=C2=A0 ret=C2= =A0=C2=A0=C2=A0 $0x4 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840b2 <+50>:=C2=A0=C2=A0=C2=A0 push= =C2=A0=C2=A0 %eax =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840b3 <+51>:=C2=A0=C2=A0=C2=A0 push= =C2=A0=C2=A0 %eax =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840b4 <+52>:=C2=A0=C2=A0=C2=A0 push= =C2=A0=C2=A0 %edx =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840b5 <+53>:=C2=A0=C2=A0=C2=A0 push= =C2=A0=C2=A0 $0x3b40 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 0x081840ba <+58>:=C2=A0=C2=A0=C2=A0 call= =C2=A0=C2=A0 0x8183020 =C2=A0=C2=A0=C2=A0 End of assembler dump. =C2=A0=C2=A0=C2=A0 (gdb) fin =C2=A0=C2=A0=C2=A0 Run till exit from #0=C2=A0 Flogcount (value=3Dmake_n= umber(9727)) at=20 data.c:3078 =C2=A0=C2=A0=C2=A0 0x0819ceaf in eval_sub (form=3D...) at eval.c:2234 =C2=A0=C2=A0=C2=A0 Value returned is $1 =3D make_number(11) =C2=A0=C2=A0=C2=A0 (gdb) cont =C2=A0=C2=A0=C2=A0 Continuing. =C2=A0=C2=A0=C2=A0 [In the *scratch* buffer, type "(logcount 9999) C-j".= ] =C2=A0=C2=A0=C2=A0 Breakpoint 3, Flogcount (value=3Dmake_number(9999)) a= t data.c:3078 =C2=A0=C2=A0=C2=A0 (gdb) fin =C2=A0=C2=A0=C2=A0 Run till exit from #0=C2=A0 Flogcount (value=3Dmake_n= umber(9999)) at=20 data.c:3078 =C2=A0=C2=A0=C2=A0 0x0819ceaf in eval_sub (form=3D...) at eval.c:2234 =C2=A0=C2=A0=C2=A0 Value returned is $2 =3D make_number(8) My /proc/cpuinfo looks like this, repeated once for each core: =C2=A0=C2=A0=C2=A0 processor=C2=A0=C2=A0=C2=A0 : 0 =C2=A0=C2=A0=C2=A0 vendor_id=C2=A0=C2=A0=C2=A0 : AuthenticAMD =C2=A0=C2=A0=C2=A0 cpu family=C2=A0=C2=A0=C2=A0 : 16 =C2=A0=C2=A0=C2=A0 model=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : 4 =C2=A0=C2=A0=C2=A0 model name=C2=A0=C2=A0=C2=A0 : AMD Phenom(tm) II X4 9= 10e Processor =C2=A0=C2=A0=C2=A0 stepping=C2=A0=C2=A0=C2=A0 : 3 =C2=A0=C2=A0=C2=A0 microcode=C2=A0=C2=A0=C2=A0 : 0x10000c8 =C2=A0=C2=A0=C2=A0 cpu MHz=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : 2608.8= 07 =C2=A0=C2=A0=C2=A0 cache size=C2=A0=C2=A0=C2=A0 : 512 KB =C2=A0=C2=A0=C2=A0 physical id=C2=A0=C2=A0=C2=A0 : 0 =C2=A0=C2=A0=C2=A0 siblings=C2=A0=C2=A0=C2=A0 : 4 =C2=A0=C2=A0=C2=A0 core id=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : 0 =C2=A0=C2=A0=C2=A0 cpu cores=C2=A0=C2=A0=C2=A0 : 4 =C2=A0=C2=A0=C2=A0 apicid=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : 0 =C2=A0=C2=A0=C2=A0 initial apicid=C2=A0=C2=A0=C2=A0 : 0 =C2=A0=C2=A0=C2=A0 fpu=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : yes =C2=A0=C2=A0=C2=A0 fpu_exception=C2=A0=C2=A0=C2=A0 : yes =C2=A0=C2=A0=C2=A0 cpuid level=C2=A0=C2=A0=C2=A0 : 5 =C2=A0=C2=A0=C2=A0 wp=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : yes =C2=A0=C2=A0=C2=A0 flags=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : fpu vme = de pse tsc msr pae mce cx8 apic sep mtrr pge=20 mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext=20 fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl=20 nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy=20 svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs=20 skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save =C2=A0=C2=A0=C2=A0 bugs=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 : tlb_mmatc= h apic_c1e fxsave_leak sysret_ss_attrs=20 null_seg amd_e400 =C2=A0=C2=A0=C2=A0 bogomips=C2=A0=C2=A0=C2=A0 : 5217.61 =C2=A0=C2=A0=C2=A0 TLB size=C2=A0=C2=A0=C2=A0 : 1024 4K pages =C2=A0=C2=A0=C2=A0 clflush size=C2=A0=C2=A0=C2=A0 : 64 =C2=A0=C2=A0=C2=A0 cache_alignment=C2=A0=C2=A0=C2=A0 : 64 =C2=A0=C2=A0=C2=A0 address sizes=C2=A0=C2=A0=C2=A0 : 48 bits physical, 4= 8 bits virtual =C2=A0=C2=A0=C2=A0 power management: ts ttp tm stc 100mhzsteps hwpstate