all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmail.com>
To: 52560@debbugs.gnu.org
Subject: bug#52560: Profiles don't survive roundtrips via files
Date: Thu, 16 Dec 2021 19:11:03 +0100	[thread overview]
Message-ID: <CAG7BpapqyYvdjKO=71bNd0krAtm7o0AtWjh_3gyXnXPk3_ciqQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

Emacs 27.2, pretty sure it has existed since forever and still exists.

To reproduce:

M-x profiler-start RET RET
<do whatever for a few seconds>
M-x profiler-stop RET
M-x profiler-report RET

After expanding a few nodes under `command-execute' you should come to
something like `#<subr call-interactively>'.

Now continue:

M-: (profiler-write-profile (profiler-cpu-profile) "/tmp/buggy-elisp.prof")
RET
M-: (profiler-report-profile (profiler-read-profile
"/tmp/buggy-elisp.prof")) RET

Expand the same nodes and observe that nodes with `#<whatever>' under them
no longer match, after file-roundtrip these `#<...>' multiply like crazy.
It seems what's going on is that these things get stored as strings in the
file, and after rereading them into memory, they no longer compare as equal
by profiler calltree-building code.

Paul

[-- Attachment #2: Type: text/html, Size: 1134 bytes --]

             reply	other threads:[~2021-12-16 18:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 18:11 Paul Pogonyshev [this message]
2021-12-19 11:53 ` bug#52560: Profiles don't survive roundtrips via files Lars Ingebrigtsen
     [not found]   ` <CAG7BpapCvb26jEuhPRW7yRDSZs3SnFsNeY=pazqH2jicNs9B6g@mail.gmail.com>
2021-12-22 12:30     ` Lars Ingebrigtsen
2021-12-22 16:03       ` Paul Pogonyshev

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='CAG7BpapqyYvdjKO=71bNd0krAtm7o0AtWjh_3gyXnXPk3_ciqQ@mail.gmail.com' \
    --to=pogonyshev@gmail.com \
    --cc=52560@debbugs.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 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.