From: Alan Mackenzie <acm@muc.de>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: The poor quality of Emacs's backtraces
Date: Mon, 17 Jul 2023 19:02:25 +0000 [thread overview]
Message-ID: <ZLWQQQwfdzM4cNLA@ACM> (raw)
In-Reply-To: <5382C438-D871-4C79-820C-DCA17C59CBCA@gmail.com>
Hello, Mattias.
On Mon, Jul 17, 2023 at 17:52:12 +0200, Mattias Engdegård wrote:
> 14 juli 2023 kl. 22.51 skrev Alan Mackenzie <acm@muc.de>:
> > Aren't we always careful? I wasn't intending to make anything slower
> > (except, marginally, the handling of errors).
> Your intent is not in doubt, but the execution path is so sensitive
> that seemingly minor changes often have outsized effect on performance.
> (This cuts both ways: there have also been optimisation opportunities
> in what appeared to be reasonably efficient code.)
Well, I've committed the code (see below). Please actually measure it
and point out where it is actually slow, rather than pontificating on
vague abstractions.
> Bug#64613 has been opened for this effort, and I intend to continue it
> shortly. I'm certainly open for ideas about how to solve the problem
> efficiently and effectively.
> > I have working code implementing the putting of this extra
> > information into backtraces.
> Writing code is the easy part. What I'm wary about is rushing a
> solution -- your solution -- to a problem that hasn't yet been studied
> in sufficient depth, and with no regard to the costs involved: not just
> performance but also the fact that other people, myself included, will
> be the ones to maintain the feature for all foreseeable future.
Well, that's one way of ensuring nothing will ever get done.
I pushed this working code this morning to the new branch
feature/named-lambdas, precisely to give people something concrete to
study, to criticize, to measure, to improve upon, and possibly to reject.
If you're going to reject anything, please reject the code, with good
reason, not vague abstract ideas.
And please don't exaggerate the "ease" with which it was written.
> The problem is compounded by our current suboptimal representation of
> closures: instead of the typical ⟨function, environment⟩ tuple, we
> represent them as copies of the function object with closed-over
> variables allocated separately and hacked into the (also copied)
> constant vector. Making that copied function object even bigger is the
> opposite of what we want to do.
I don't agree, at least not at the moment. The function object, all
three varieties, is big enough to hold all the information it needs to
hold. Should it need to become marginally bigger, so be it.
> There is also the question of what information should be there if any
> were to be added. For example, source location could arguably be more
> useful than function name.
These are all things that can be changed later. The main danger is doing
nothing but talk, talk, talk, .... Then the topic will die down, and
come up again weeks, months in the future, possibly in a bug report, when
we will talk, talk, talk, again. There is a cost to not fixing things.
> But more importantly, since you said yourself that you would have been
> satisfied with a backtrace that included the faulting operation, ....
I think you've misunderstood me. That "faulting operation" is merely one
of the things I want. I would not be satisfied by just that. The
identity of the code referred to by each backtrace line is also
essential.
> .... and we agree that this is something we want in any case, wouldn't
> it make sense to begin there? The risk is much lower and it won't
> saddle us with irreversible maintenance costs.
Whatever we do will involve "maintenance costs". Having coded this
change, I have some good idea of where undue maintenance costs in the
Lisp engine lie. I don't think they're where you might think.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2023-07-17 19:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 13:35 The poor quality of Emacs's backtraces Alan Mackenzie
2023-07-13 14:17 ` Christopher Dimech
2023-07-13 14:57 ` Mattias Engdegård
2023-07-14 8:00 ` Ihor Radchenko
2023-07-14 9:08 ` Mattias Engdegård
2023-07-14 9:18 ` Ihor Radchenko
2023-07-14 10:58 ` Alan Mackenzie
2023-07-14 10:56 ` Eli Zaretskii
2023-07-14 10:48 ` Alan Mackenzie
2023-07-14 12:35 ` Mattias Engdegård
2023-07-14 13:07 ` Alan Mackenzie
2023-07-14 18:06 ` Mattias Engdegård
2023-07-14 20:51 ` Alan Mackenzie
2023-07-17 15:52 ` Mattias Engdegård
2023-07-17 19:02 ` Alan Mackenzie [this message]
2023-07-17 19:50 ` Ihor Radchenko
2023-07-18 11:19 ` Alan Mackenzie
2023-07-18 11:54 ` Ihor Radchenko
2023-07-18 13:57 ` Alan Mackenzie
2023-07-19 8:05 ` Ihor Radchenko
2023-07-19 10:33 ` Mattias Engdegård
2023-07-19 15:45 ` Alan Mackenzie
2023-07-14 1:10 ` Michael Heerdegen
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=ZLWQQQwfdzM4cNLA@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=mattias.engdegard@gmail.com \
/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.