all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: pipcet@protonmail.com, 72559-done@debbugs.gnu.org, yantar92@posteo.net
Subject: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data
Date: Sat, 17 Aug 2024 20:49:22 +0300	[thread overview]
Message-ID: <86h6bj11lp.fsf@gnu.org> (raw)
In-Reply-To: <jwved6n2hak.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 17 Aug 2024 13:35:07 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: pipcet@protonmail.com,  yantar92@posteo.net,  72559@debbugs.gnu.org
> Date: Sat, 17 Aug 2024 13:35:07 -0400
> 
> >> I don't think we want to write them as function objects, because then
> >> we'll again bump into the problem that some function objects contain
> >> unprintable objects like buffers.
> > But Emacs 29 does succeed there, at least in my testing, including
> > when the profile shows byte-compiled functions.  So how come Emacs 30
> > cannot?
> 
> Emacs-29 did:
> 
>     (defun profiler-format-entry (entry)
>       "Format ENTRY in human readable string.
>     ENTRY would be a function name of a function itself."
>       (cond ((memq (car-safe entry) '(closure lambda))
>              (format "#<lambda %#x>" (sxhash entry)))
>             ((byte-code-function-p entry)
>              (format "#<compiled %#x>" (sxhash entry)))
>             ((or (subrp entry) (symbolp entry) (stringp entry))
>              (format "%s" entry))
>             (t
>              (format "#<unknown %#x>" (sxhash entry)))))
> 
>     (defun profiler-fixup-entry (entry)
>       (if (symbolp entry)
>           entry
>         (profiler-format-entry entry)))
> 
> IOW it did not save the actual function object but only some kind of
> "name" (like we do now).
> 
> And then when using such a saved backtrace, the `stringp` above made it
> print just that name.  My suggestion above (as in the patch below) just
> re-instates that previous behavior.

Thanks, installed on the emacs-30 branch, and closing the bug.





      reply	other threads:[~2024-08-17 17:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-10 12:41 bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data Ihor Radchenko
2024-08-10 12:50 ` Eli Zaretskii
2024-08-10 13:05   ` Ihor Radchenko
2024-08-10 13:56 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-10 14:09   ` Eli Zaretskii
2024-08-10 16:17   ` Eli Zaretskii
2024-08-14 12:21     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-14 12:41       ` Eli Zaretskii
2024-08-14 12:48       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-17 10:03         ` Eli Zaretskii
2024-08-17 14:07           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-17 14:27             ` Eli Zaretskii
2024-08-17 17:35               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-17 17:49                 ` Eli Zaretskii [this message]

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=86h6bj11lp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72559-done@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=pipcet@protonmail.com \
    --cc=yantar92@posteo.net \
    /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.