unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Zach Shaftel <zshaftel@gmail.com>
To: emacs-devel@gnu.org
Subject: GSoC project - Improving ELisp Traceback and Debugging Information
Date: Wed, 03 Jun 2020 17:42:27 -0400	[thread overview]
Message-ID: <87eeqv6d30.fsf@gmail.com> (raw)

Hello all,

This summer I will be working on improving ELisp traceback 
information for Google Summer of Code.

My ultimate goal is to record the source location of calls so that 
this can be used by the backtrace, eg. buttons which jump to the 
exact function call which produces the error. The minimum goal 
however is to have the offset recorded while maintaining 
acceptable performance, and allow the backtrace to jump to the 
point in the disassembly where the error occurs.

So far I've modified the byte-code interpreter to simply store the 
offset of each funcall in the backtrace specbinding frame, and 
modified backtrace.el so the sequence of offsets is printed 
alongside each respective call in the backtrace. It's available on 
the feature/soc-bytecode-in-traceback-specbinding branch on 
Savannah. Here's what the backtrace output looks like:

Debugger entered--Lisp error: (wrong-type-argument 
number-or-marker-p nil)
    10 test-debugger()
     6 call-test-debugger((110 117 109 98 101 114 115 0 1 2 3 4 
     5))
     9 call-call-test-debugger()
       load("/home/zach/ELisp/bad-stuff.elc" nil t)
   513 command-line-1(("-l" "bad-stuff.elc"))
  1482 command-line()
   417 normal-top-level()

The current implementation entails a performance regression (based 
on elisp-benchmarks.el on my machine, a ~10% slowdown), so it's 
not viable in the current state, but there's plenty of ways to 
improve on that. Any ideas would be appreciated.

I've been looking at the scratch/accurate-warning-pos branch as 
well as prior discussions and am still evaluating different 
approaches to solving the task. It might be necessary to modify 
the way code is represented during compilation, be it simply with 
the annotated symbols as in that branch or with another more 
generalized form of object representation. The latter approach 
would be more versatile, but doing so while still preventing the 
compiler from hogging memory would be tough, and is broad enough 
that it's probably outside the scope of this project.

I'd love to hear others' thoughts, advice, and comments on the 
project, and on what sorts of changes would be most desired for 
inclusion in Emacs.

Thanks,
Zach Shaftel



             reply	other threads:[~2020-06-03 21:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 21:42 Zach Shaftel [this message]
2020-06-05  7:00 ` GSoC project - Improving ELisp Traceback and Debugging Information Helmut Eller
2020-06-06 18:20   ` Zach Shaftel
2020-06-06 19:56     ` Helmut Eller
2020-06-06 23:18       ` Zach Shaftel

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eeqv6d30.fsf@gmail.com \
    --to=zshaftel@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).