From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67141: 30.0.50; Missing element in the backtrace Date: Mon, 20 Nov 2023 13:47:59 -0500 Message-ID: References: <83sf59u4vy.fsf@gnu.org> <834jhgk4hv.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2839"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 67141@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 20 19:51:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r59Md-0000Wd-Mb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Nov 2023 19:51:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r59ML-0002Bd-Gi; Mon, 20 Nov 2023 13:51:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r59MJ-0002BD-Vy for bug-gnu-emacs@gnu.org; Mon, 20 Nov 2023 13:51:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r59MJ-0001t3-Nu for bug-gnu-emacs@gnu.org; Mon, 20 Nov 2023 13:50:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r59ML-0002u2-Si for bug-gnu-emacs@gnu.org; Mon, 20 Nov 2023 13:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Nov 2023 18:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67141 X-GNU-PR-Package: emacs Original-Received: via spool by 67141-submit@debbugs.gnu.org id=B67141.170050624511129 (code B ref 67141); Mon, 20 Nov 2023 18:51:01 +0000 Original-Received: (at 67141) by debbugs.gnu.org; 20 Nov 2023 18:50:45 +0000 Original-Received: from localhost ([127.0.0.1]:54548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r59M4-0002tR-VK for submit@debbugs.gnu.org; Mon, 20 Nov 2023 13:50:45 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r59M3-0002tF-9R for 67141@debbugs.gnu.org; Mon, 20 Nov 2023 13:50:44 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B633C100068; Mon, 20 Nov 2023 13:50:35 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1700506235; bh=Lj5g3e0HffjcApwS5g9CgT1uBx4vaLZDIHQ3EtP5GGw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Lr8S3BGwcr/oF/RFN86r5aAcZ4xFQ19DtNjrLAVJsqz0OZqyMktngBi4I9UCffl0Y 9UQ8wBcL2WaeAmQRAUjS+Tpi44qc4odY5GUlmhB8vYQHglj2/b5RftqiMs3/i0GhaI 6dUcjuP6fNpC0czIjH+XhZFUMt4O42Ir4M0JT0mxgLRl7akVVWV21TNE/hlTz9od96 2dg4gGxJ0uH76h94nb6OWObTTONsb7vbYept/oU514HoRb8FJXT4wcSJzpLEjnG10M DfGT7jlaggkioK8AdZuWhuHsaKn91Z3SzNkaWnERTJ/CKcUnbqCPseZjertPb3dorY 6PnJHMp3KeTtQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0577D100033; Mon, 20 Nov 2023 13:50:35 -0500 (EST) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E2DE3120468; Mon, 20 Nov 2023 13:50:34 -0500 (EST) In-Reply-To: (Andrea Corallo's message of "Mon, 20 Nov 2023 13:16:39 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274682 Archived-At: >>> If you want then I think we should consider this bug not only native >>> comp related, as I explained we have this issue since long time in >>> other circumstances. >> I think it's qualitatively different, but yes, this is not the only >> occurrence of the problem. AFAICT, we have 3 different cases: >> >> A. Native compiled code making a "direct call" to a C primitive. >> B. ELisp primitives with their own bytecode. >> C. C code calling `Ffoo` instead of `Ffuncall (Qfoo, ...)`. >> >> (B) and (C) have been with us for ever. They also suffer from being >> unaffected by advice. (A) on the other hand is new, but obeys advice. >> >> I think (C) is qualitatively very different from (A) because >> (C) can be fixed by hand whenever we decide that it's a problem, > > Well ATM we can fix A by hand as well with a (declare (speed 0)) in the > calling function. Admittedly would be nice to have a more narrowed way > to handle this at call site. I'd e in favor of adding it. Do you think > this would be sufficient? Don't know if it would be sufficient, nor if it would be useful. I don't yet have enough experience with it to get a good intuition about when we need that info and how we use it. So far, most of the cases where I noticed the absence of a function in the backtrace: - I wasn't sure whether it was an occurrence of the current problem, or simply some misunderstanding on my part. - I wouldn't have known which function call to annotate (I needed the backtrace info specifically to find that out :-( - I de-optimized the function by redefining it (i.e. non-compiled) in order to solve the immediate lack of info. It'd be good to reduce our reliance on interpreted ELisp code for debugging purposes, but so far, that's still our go-to tool, AFAICT. I suspect that for the non-expert ELisp coder the above are serious problems. Stefan