From: Stefan Monnier Date: Sat, 22 Jul 2023 21:20:51 +0000 (-0400) Subject: * src/eval.c (get_backtrace): Don't skip the top frame X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f37c65b402f8a054fed9a3d6234cb7f85da3621a;p=emacs.git * src/eval.c (get_backtrace): Don't skip the top frame `profiler.el` was reporting incomplete backtraces. I had a suspicion there was something off, but it became obvious when I saw that `set-buffer-multibyte` did not appear in the `profiler-report` output when opening a large compressed tarball, even though I knew it to be a large contributor (which `elp-results` confirmed). I have no idea why this `backtrace_next` was there, sadly, but now `profiler-report` gives me results that make a lot more sense. --- diff --git a/src/eval.c b/src/eval.c index 3f4e77cd3b1..9e54d489a3b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -4203,7 +4203,7 @@ mark_specpdl (union specbinding *first, union specbinding *ptr) void get_backtrace (Lisp_Object array) { - union specbinding *pdl = backtrace_next (backtrace_top ()); + union specbinding *pdl = backtrace_top (); ptrdiff_t i = 0, asize = ASIZE (array); /* Copy the backtrace contents into working memory. */