From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps. Date: Fri, 23 Nov 2018 13:09:05 +0000 Message-ID: <20181123130904.GA2916@ACM> References: <20181117124534.GA8831@ACM> <83muq7u9rk.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1542979054 31190 195.159.176.226 (23 Nov 2018 13:17:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Nov 2018 13:17:34 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: michael_heerdegen@web.de, cpitclaudel@gmail.com, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 23 14:17:30 2018 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 1gQBKr-0007zG-EF for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2018 14:17:29 +0100 Original-Received: from localhost ([::1]:52258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQBMx-0000QM-IN for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2018 08:19:39 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQBLl-0007qY-9E for emacs-devel@gnu.org; Fri, 23 Nov 2018 08:18:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQBFh-000353-CS for emacs-devel@gnu.org; Fri, 23 Nov 2018 08:12:13 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:62583 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gQBFh-00033j-1N for emacs-devel@gnu.org; Fri, 23 Nov 2018 08:12:09 -0500 Original-Received: (qmail 85285 invoked by uid 3782); 23 Nov 2018 13:12:07 -0000 Original-Received: from acm.muc.de (p2E5D5CB0.dip0.t-ipconnect.de [46.93.92.176]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 23 Nov 2018 14:12:05 +0100 Original-Received: (qmail 2952 invoked by uid 1000); 23 Nov 2018 13:09:05 -0000 Content-Disposition: inline In-Reply-To: <83muq7u9rk.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:231312 Archived-At: Hello, Eli. On Sat, Nov 17, 2018 at 15:13:51 +0200, Eli Zaretskii wrote: > > Date: Sat, 17 Nov 2018 12:45:34 +0000 > > Cc: Michael Heerdegen , > > Clément Pit-Claudel , > > emacs-devel@gnu.org > > From: Alan Mackenzie > > Eli, in bug #24128, you complained that in compiling progmodes/gud-mi.el > > and progmodes/gud.el, you got warning message positions which were > > clearly wrong. Would it be possible to reconstruct the versions of those > > files which gave these errors? It would be great to be able to try them > > out on this new software. > The current version of gdb-mi.el still emits the warning. I didn't see this, but never mind. The branch scratch/accurate-warning-pos now bootstraps. (It also now runs on optimised builds. ;-) Its bootstrap is a mere 7.1% slower than master's. Currently, warning messages contain two source positions, that of the traditional scheme, and of the new one. A typical message currently looks like this: cedet/srecode/find.el:248:57:247:35:Warning: Unknown slot `:application' . The old position was line 248 column 57, the new L247 C35. The question arises, how different are the new positions from the old? I saved the stderr from bootstrap to a file, and fed it through the following AWK filter: ######################################################################### #! /usr/bin/gawk -f BEGIN { FS = ":" } NF >= 6 { if (($2 == $4) && ($3 == $5)) same++ else { different++ printf("%d: ", NR) print $0 } } END { print printf("same: %d\n", same) printf("different: %d\n", different) } ######################################################################### . There were 81 positions the same (old and new), there were 254 different. A large part of these 254 different were "Warning: Unknown slot". In these warnings, the new position is correct, the old one is incorrect. In fact, of all the differences I've looked at, the new one is always the correct one. Thus, this branch works, and the idea behind it is sound. There are one or two nastinesses in it: principally, I had to duplicate the function byte-compile-strip-symbol-positions as cl-macs-strip-symbol-positions to get the thing to bootstrap. There is surely a straightforward solution to this, but it escapes me at the moment. Although the branch works, it has been tested solely on 64-bit GNU/Linux, the only system I have. This despite some fairly hefty changes in lisp.h. So, where do we go from here? -- Alan Mackenzie (Nuremberg, Germany).