From unknown Mon Aug 18 11:17:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#72559 <72559@debbugs.gnu.org> To: bug#72559 <72559@debbugs.gnu.org> Subject: Status: 31.0.50; profiler-report-write-profile produced unreadable data Reply-To: bug#72559 <72559@debbugs.gnu.org> Date: Mon, 18 Aug 2025 18:17:46 +0000 retitle 72559 31.0.50; profiler-report-write-profile produced unreadable da= ta reassign 72559 emacs submitter 72559 Ihor Radchenko severity 72559 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 08:41:21 2024 Received: (at submit) by debbugs.gnu.org; 10 Aug 2024 12:41:22 +0000 Received: from localhost ([127.0.0.1]:39169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sclPN-00052R-HD for submit@debbugs.gnu.org; Sat, 10 Aug 2024 08:41:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:57634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sclPI-00052G-Tu for submit@debbugs.gnu.org; Sat, 10 Aug 2024 08:41:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sclOo-0007QB-3W for bug-gnu-emacs@gnu.org; Sat, 10 Aug 2024 08:40:46 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sclOl-0007Dz-AS for bug-gnu-emacs@gnu.org; Sat, 10 Aug 2024 08:40:45 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9C80C240104 for ; Sat, 10 Aug 2024 14:40:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1723293640; bh=zdw0Fqd90cumzZBDtpz+jIIazFyhe4X0Grsck309mfQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=DKxkrhxzrftscCMmGQX9nr1Zl54D8JJHjapYAs9Z06bLZ8kTE9+KxmMxV19Xn83Cf 3mxgWakUxqdhMZ9S38/4/WOLvaejwfGaGhSFtHe5C05Z9U4gFzRTH1fx5BPz2jnnQ7 5S5a7F54qGLjhAvUMw4OLVBhHx8Rt1VMoOnAs/tm6ZM3NnC5D7xYs0Yhfn/fMwasiy 2W+CbDiBZZMFl/OFqtp57TxLmD06PvY8Zst597jTAB0JU/+ACgzVwUJvr8DzcIhKKy CnEjoyhNLQjNnS5Z7bR5SMmdTGpYPGCND1OXu9sDbow+mzaUStrKDxs5QzoxZl9smC LB+BN+gCBrPLQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Wh0kJ26rNz6tvZ for ; Sat, 10 Aug 2024 14:40:40 +0200 (CEST) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 31.0.50; profiler-report-write-profile produced unreadable data X-Debbugs-Cc: Date: Sat, 10 Aug 2024 12:41:52 +0000 Message-ID: <87wmko35yn.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, Since ~few months ago, I started having issues with profiler dumps shared by users. The latest example is in https://list.orgmode.org/87r0axvu7y.fsf@gmail.com/T/#u When trying to open the profiler data with M-x profiler-find-profile, I keep getting profiler-find-profile: Invalid read syntax: "#<", 2, 64028 or similar errors. In other words, unreadable objects are somehow dumped, rendering the profiles useless. To reproduce, 1. emacs -Q 2. M-x profiler-start RET cpu RET 3. M-x profiler-report 4. M-x profiler-report-write-profile /tmp/1.eld 5. M-x profiler-find-profile /tmp/1.eld In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0) of 2024-07-26 built on localhost Repository revision: ba708a0681eced555585fb8281f24b75b32c4178 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: Gentoo Linux -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 08:53:13 2024 Received: (at 72559) by debbugs.gnu.org; 10 Aug 2024 12:53:13 +0000 Received: from localhost ([127.0.0.1]:39194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sclar-0005OJ-EV for submit@debbugs.gnu.org; Sat, 10 Aug 2024 08:53:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sclap-0005O1-Do for 72559@debbugs.gnu.org; Sat, 10 Aug 2024 08:53:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sclYB-0000Bg-4j; Sat, 10 Aug 2024 08:50:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=aVJGEKswFLn+Kg1zQCkz2JIFDbUZ8TIwimZo46qd4M4=; b=iYXwwhFzb/+Y nhPl9datiyOnOLkeioiSwqhN8MXdIpQnfXSzgHPUcDaLd53FufhJONC1NZhVTT9KO/JaenX1G7pTE 4A+sp5fS4hoJpf3c9KVgiuBbSf2UA0u3pTdQodnr/uB0mPULmiuBMF6Pk3XmLTMHzZueLox+0P2LI b6Bwj98GNUhM0pWG90RtgfO/C8bQAizComfpfWCpaGCz2X3gMZ4fl7cToPsQp6ps0kMkvRLUIe4Rz w4saLS6Fw24OXS9+NavoJ5uUWCwULBD+GHdwG8BXMwH33oq9btDJJikse8X2KDrZrprx9ynP67f70 LDynhjrVqdNnkmclT1pY6w==; Date: Sat, 10 Aug 2024 15:50:24 +0300 Message-Id: <86bk20k0dr.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87wmko35yn.fsf@localhost> (message from Ihor Radchenko on Sat, 10 Aug 2024 12:41:52 +0000) Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data References: <87wmko35yn.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Sat, 10 Aug 2024 12:41:52 +0000 > > Since ~few months ago, I started having issues with profiler dumps > shared by users. The latest example is in > https://list.orgmode.org/87r0axvu7y.fsf@gmail.com/T/#u > > When trying to open the profiler data with M-x profiler-find-profile, I > keep getting > profiler-find-profile: Invalid read syntax: "#<", 2, 64028 > or similar errors. > > In other words, unreadable objects are somehow dumped, rendering the > profiles useless. Does this happen on the emacs-30 branch as well? In any case, bisection would be useful. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 09:05:24 2024 Received: (at 72559) by debbugs.gnu.org; 10 Aug 2024 13:05:24 +0000 Received: from localhost ([127.0.0.1]:39198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sclmd-0005mj-OR for submit@debbugs.gnu.org; Sat, 10 Aug 2024 09:05:24 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sclma-0005mO-AD for 72559@debbugs.gnu.org; Sat, 10 Aug 2024 09:05:22 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EE575240027 for <72559@debbugs.gnu.org>; Sat, 10 Aug 2024 15:04:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1723295085; bh=G7mNiwyrUlj3cgelvDeOAaW2EflpYhSiNy43/AyYizI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=i7oAO1FAyETNTaNSq8A2qKiTsxEgL4lM27gXv2owp2i8Mdv0pS4CDgyQtIlbLw2+n FSo0qO9kP0doa977/dPasvPZXe+iN3HgY2dubXTQRUTH9on/xbYkxgFpg5EDCit0Rv DCnMi1VYA8mfg8/2TQC5Vbp9BlKeoUmVhfgQVJo5J7rJvdaGEWTzpLLW955z0C7kS+ w0l6LKoe8Zy1WeeR0nJTl/VzUSMcGDh6VuxcuO8CcP9WSxz1dZuTn3QDWr9xGNIQEz Qp8+7gWYaAfeaj5nyjdfXcfIanLbcGxIUdxSmlv0HhCpgwRY1+K2d25ej+cKQVjHmu BKhQjIiVkL2Pw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Wh1G35J9sz9rxF; Sat, 10 Aug 2024 15:04:43 +0200 (CEST) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data In-Reply-To: <86bk20k0dr.fsf@gnu.org> References: <87wmko35yn.fsf@localhost> <86bk20k0dr.fsf@gnu.org> Date: Sat, 10 Aug 2024 13:05:55 +0000 Message-ID: <87o76034uk.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> In other words, unreadable objects are somehow dumped, rendering the >> profiles useless. > > Does this happen on the emacs-30 branch as well? Yes GNU Emacs 30.0.60 (build 1, x86_64-pc-linux-gnu, cairo version 1.18.0) of 2= 024-06-29 CPU profiler started You can run the command =E2=80=98profiler-report=E2=80=99 with M-x pr-repo File =E2=80=98/tmp/2.eld=E2=80=99 exists; overwrite? (y or n) y Saving file /tmp/2.eld... Wrote /tmp/2.eld profiler-find-profile: Invalid read syntax: "#<", 2, 1990 > In any case, bisection would be useful. It may take some time. I have a long Org mode backlog to work on in the coming days. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 09:57:34 2024 Received: (at 72559) by debbugs.gnu.org; 10 Aug 2024 13:57:34 +0000 Received: from localhost ([127.0.0.1]:40236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scmb7-0007bw-J6 for submit@debbugs.gnu.org; Sat, 10 Aug 2024 09:57:33 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:18679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scmb4-0007be-3K for 72559@debbugs.gnu.org; Sat, 10 Aug 2024 09:57:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1723298214; x=1723557414; bh=ZQmp05/lBSeVOYIKw20dPzbFATVIxoyqi9Wf5i41AeM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=FOjM95D5K4xqPiOtNwGjAZGCSrBNIaA3mnXsAwqWAe8NtOmEH9DToXLPV1k5NbWWk 432j0j6CyJILWjixQk2+9oj6c20Ttj9mTuGdwFIgcEl3LrOYgmlJ6vY0POzjzqr2pC sF/VKBPUhWcr+ipoIrVz9IE02LkipvZRfTx7aavJyErGbLcS9bYrPgh+Rpu2yuaNtK eT7x+H1//61SHmCggwyOmUhaYB7Xo/XXNhwCh405xjMC0VFnxUmH8RjM5K/ZOHraRJ jJGDiz1noDMVGuaEtp1ar8XUY7snn9EoKygNaZSqo4fyRJvDcaFd9vy2vw4nnCvtQZ 5lydZeiSxUQtQ== Date: Sat, 10 Aug 2024 13:56:49 +0000 To: Ihor Radchenko From: Pip Cet Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data Message-ID: <877ccomqg3.fsf@protonmail.com> In-Reply-To: <87wmko35yn.fsf@localhost> References: <87wmko35yn.fsf@localhost> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 9abdb0b40b5f383508d29cdd23eef086e62cf932 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Ihor Radchenko" writes: > Since ~few months ago, I started having issues with profiler dumps > shared by users. The latest example is in > https://list.orgmode.org/87r0axvu7y.fsf@gmail.com/T/#u > > When trying to open the profiler data with M-x profiler-find-profile, I > keep getting > profiler-find-profile: Invalid read syntax: "#<", 2, 64028 > or similar errors. (Just trying to save others the work of going to character 64028 in that dump). In that example, the relevant section of the dump looks like this: #[0 "..." [# buffer-name kill-buffer] 2] Which looks like a byte code closure produced by make-closure, probably by with-temp-buffer: (defmacro with-temp-buffer (&rest body) "Create a temporary buffer, and evaluate BODY there like `progn'. The buffer does not run the hooks `kill-buffer-hook', `kill-buffer-query-functions', and `buffer-list-update-hook'. See also `with-temp-file' and `with-output-to-string'." (declare (indent 0) (debug t)) (let ((temp-buffer (make-symbol "temp-buffer"))) `(let ((,temp-buffer (generate-new-buffer " *temp*" t))) ;; `kill-buffer' can change current-buffer in some odd cases. (with-current-buffer ,temp-buffer (unwind-protect =09 (progn ,@body) (and (buffer-name ,temp-buffer) (kill-buffer ,temp-buffer))))))) No idea what a good fix would be, though. Pip From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 10:09:58 2024 Received: (at 72559) by debbugs.gnu.org; 10 Aug 2024 14:09:59 +0000 Received: from localhost ([127.0.0.1]:40246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scmn8-0007uj-Fh for submit@debbugs.gnu.org; Sat, 10 Aug 2024 10:09:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scmn5-0007uW-Dc for 72559@debbugs.gnu.org; Sat, 10 Aug 2024 10:09:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scmmW-0001K2-3h; Sat, 10 Aug 2024 10:09:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=i59S+w/o76zTVxF3AF+EmziIimt09P1eW7ZYjI/92IU=; b=F70Jn8sDEkWW 07YYRMtTL0NNy/fRdIjBvIvVqntDrQsDcsNMSsEJVLhxf811uicwWithdF8HB1kSKIicyxptgSe2v eAMJA2vWbPmdFW4eRKGYK/34WseOdiDQ99dmM4yreHbwL4uooCJTlUZ1Pm5nELKQE61b2G+W45dLV oTVFsqdVDCOoEJdnYt6mqyMrlanIRr0h5KGtqMpHZhfNug5CppfDvIUxWc9kG9zLP5YNc2b73GJc3 PQ1j0PRQhwJBMJQAcabBeHCivaWofzGBlJ5T2ae4a65hXaHAizzdaa6EVcO5cNusUfwL7oxGt7jrA lUoUe5VDwZ9cMymzvySQBw==; Date: Sat, 10 Aug 2024 17:09:17 +0300 Message-Id: <86a5hkjwqa.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet , Stefan Monnier In-Reply-To: <877ccomqg3.fsf@protonmail.com> (bug-gnu-emacs@gnu.org) Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 72559@debbugs.gnu.org > Date: Sat, 10 Aug 2024 13:56:49 +0000 > From: Pip Cet via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > "Ihor Radchenko" writes: > > > Since ~few months ago, I started having issues with profiler dumps > > shared by users. The latest example is in > > https://list.orgmode.org/87r0axvu7y.fsf@gmail.com/T/#u > > > > When trying to open the profiler data with M-x profiler-find-profile, I > > keep getting > > profiler-find-profile: Invalid read syntax: "#<", 2, 64028 > > or similar errors. > > (Just trying to save others the work of going to character 64028 in that > dump). > > In that example, the relevant section of the dump looks like this: > > #[0 "..." [# buffer-name kill-buffer] 2] > > Which looks like a byte code closure produced by make-closure, probably > by with-temp-buffer: > > (defmacro with-temp-buffer (&rest body) > "Create a temporary buffer, and evaluate BODY there like `progn'. > The buffer does not run the hooks `kill-buffer-hook', > `kill-buffer-query-functions', and `buffer-list-update-hook'. > See also `with-temp-file' and `with-output-to-string'." > (declare (indent 0) (debug t)) > (let ((temp-buffer (make-symbol "temp-buffer"))) > `(let ((,temp-buffer (generate-new-buffer " *temp*" t))) > ;; `kill-buffer' can change current-buffer in some odd cases. > (with-current-buffer ,temp-buffer > (unwind-protect > (progn ,@body) > (and (buffer-name ,temp-buffer) > (kill-buffer ,temp-buffer))))))) > > No idea what a good fix would be, though. Thanks, adding Stefan in the hope that he could have some ideas. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 12:18:21 2024 Received: (at 72559) by debbugs.gnu.org; 10 Aug 2024 16:18:21 +0000 Received: from localhost ([127.0.0.1]:40361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sconM-0003Ba-Ol for submit@debbugs.gnu.org; Sat, 10 Aug 2024 12:18:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sconK-0003BL-1S for 72559@debbugs.gnu.org; Sat, 10 Aug 2024 12:18:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scomj-0000eB-83; Sat, 10 Aug 2024 12:17:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=y4rhIEA4QW4+7yv1naEta4uz2ylEQNf08Y/I1RS29Rk=; b=fw2JapVKq/Et s41HeC+FAqZ+FCgPViA1Dtdm1kEu82sE1FIMixp++bRNc96WHiG/LiPOJtn7+fAVgca2ntvS1ZdmX AsZIzkvTDTLVpX2ktUnXE2EsEHmEYNdexbW7VfH37pNvXEpfLjNY8PPxE9PM57dpKbElUSxvzST4B oJpgIZPm3mwz32/fzvJ+Ifdk7U3OQyQFzX0eJjWhAZVwIy4i0J4Wi4XAQqRWDNOUTjEJENcyHh0Fn k85TWyCYYLlsKTLXS5DA1t5yE1uR0epNO2PfBXy5aCZ1PlzjXm3NkWT6fXaY3nVSAPZw5M8VyW3AP 2uy/ZXSoV+ILqs+rV/k9LA==; Date: Sat, 10 Aug 2024 19:17:38 +0300 Message-Id: <867ccojqsd.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet , Stefan Monnier In-Reply-To: <877ccomqg3.fsf@protonmail.com> (bug-gnu-emacs@gnu.org) Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 72559@debbugs.gnu.org > Date: Sat, 10 Aug 2024 13:56:49 +0000 > From: Pip Cet via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > "Ihor Radchenko" writes: > > > Since ~few months ago, I started having issues with profiler dumps > > shared by users. The latest example is in > > https://list.orgmode.org/87r0axvu7y.fsf@gmail.com/T/#u > > > > When trying to open the profiler data with M-x profiler-find-profile, I > > keep getting > > profiler-find-profile: Invalid read syntax: "#<", 2, 64028 > > or similar errors. > > (Just trying to save others the work of going to character 64028 in that > dump). > > In that example, the relevant section of the dump looks like this: > > #[0 "..." [# buffer-name kill-buffer] 2] > > Which looks like a byte code closure produced by make-closure, probably > by with-temp-buffer: I think the problem is that we now dump the buttons into the saved profile. We also write symbols as strings. Two examples: ["redisplay_internal (C function)" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil"] [#("vertical-motion" 0 15 (help-args (vertical-motion) category help-function-button button (t))) #("line-move-visual" 0 16 (help-args (line-move-visual) category help-function-button button (t))) #("line-move" 0 9 (help-args (line-move) category help-function-button button (t))) #("previous-line" 0 13 (help-args (previous-line) category help-function-button button (t))) #("funcall-interactively" 0 21 (help-args (funcall-interactively) category help-function-button button (t))) #("call-interactively" 0 18 (help-args (call-interactively) category help-function-button button (t))) #("command-execute" 0 15 (help-args (command-execute) category help-function-button button (t))) "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil" "nil"] And finally, even reading a profile written by Emacs 29 produces bogus entries, like # instead of #. So something is seriously foobar in profiler.el, or maybe in the printing infrastructure it uses. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 08:21:52 2024 Received: (at 72559) by debbugs.gnu.org; 14 Aug 2024 12:21:52 +0000 Received: from localhost ([127.0.0.1]:46430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seD0i-0002RS-J4 for submit@debbugs.gnu.org; Wed, 14 Aug 2024 08:21:52 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seD0h-0002RG-CG for 72559@debbugs.gnu.org; Wed, 14 Aug 2024 08:21:51 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 30E0380A64; Wed, 14 Aug 2024 08:21:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1723638068; bh=FvBvPfXBINkG1KxhmrrZk23D4faQRgBVINKbdP9HlmM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jQerj8aju1bjISX+CxQkCDUxgpPJU3fBT6oV+BX11ZoI8/+GNQhfb1TCRVzZGagR1 QWqk7B78IpU9tyQNW1P4ETY1uHphXA7xk6difHfJE4rR45UCdHTaZu3Y1QTm31+2OP oWYrSUsjTFQ02YJqt/V9fb2RrVcqF6gbZGMD8GNHLpYKhTgIxOlUXi/1KS8gL9BWiu 7IEcWhXgbR3qfoU+KNhH8xUVfIjf5vAqPR3DGoqmBmOjgmP1NeP6JN0n0swxPnNEa7 Z/juwRSja6hpcmH5lipaUKUAKzW07/6CmWlsEmq6KcdNfhdF+dVXKHp0eNClGxaxxo 43mSMPfT30pSw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 97DAD80672; Wed, 14 Aug 2024 08:21:08 -0400 (EDT) Received: from pastel (unknown [216.154.9.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 53EDA12021A; Wed, 14 Aug 2024 08:21:08 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data In-Reply-To: <867ccojqsd.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Aug 2024 19:17:38 +0300") Message-ID: References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> Date: Wed, 14 Aug 2024 08:21:07 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.250 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, Pip Cet , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I think the problem is that we now dump the buttons into the saved > profile. We also write symbols as strings. Two examples: Yup, I introduced the bug in commit a1f8702e8345. I think the patch below is in order (it partly undoes commit a1f8702e8345). Can someone confirm that it fixes the problem for them as well? Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 08:42:28 2024 Received: (at 72559) by debbugs.gnu.org; 14 Aug 2024 12:42:28 +0000 Received: from localhost ([127.0.0.1]:46444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDKd-00032t-Ka for submit@debbugs.gnu.org; Wed, 14 Aug 2024 08:42:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDKb-00032e-MH for 72559@debbugs.gnu.org; Wed, 14 Aug 2024 08:42:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seDJv-0003yj-IE; Wed, 14 Aug 2024 08:41:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ef6pC1Wid662FjtmoC3P3+xHZok6XP/ySoInLrw8kA8=; b=PR/eA0CDCXm6 g4ggcGJU2F1Q5gkMniudG9l5Ec0oXh5XtG5KwAC/TtnEuywO/M1jkjgOdgLNojh3thM2XXz0M+RVH M5Am4PPdaZQsNBmTO6sh3+tjP+2c4Lg3CoxLCUvT1VN1XTmZxlotR44pUermoeKQ8ZKBG6G8/sUTE MATy2UVoSkJoJJ7MS9zhv/W70wxliZ6LLUOnrr68y8CMMeVDh+oUkGX8Z07+4pgS86hfmTjA9ctaA ZGvjA8rWOdIl1vLC8OIPsUjYUG8smd2z0G/o5AHxC2r0kfl4xm7BYSfn99/R/FoLZ02G8bYXki29m Q0T8xObs9LvVHmYrFzsKpQ==; Date: Wed, 14 Aug 2024 15:41:40 +0300 Message-Id: <86plqb8eez.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Wed, 14 Aug 2024 08:21:07 -0400) Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, pipcet@protonmail.com, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: Pip Cet , yantar92@posteo.net, > 72559@debbugs.gnu.org > Date: Wed, 14 Aug 2024 08:21:07 -0400 > > > I think the problem is that we now dump the buttons into the saved > > profile. We also write symbols as strings. Two examples: > > Yup, I introduced the bug in commit a1f8702e8345. > I think the patch below is in order (it partly undoes commit > a1f8702e8345). > > Can someone confirm that it fixes the problem for them as well? ENOPATCH From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 08:49:28 2024 Received: (at 72559) by debbugs.gnu.org; 14 Aug 2024 12:49:28 +0000 Received: from localhost ([127.0.0.1]:46455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDRQ-0003ET-0x for submit@debbugs.gnu.org; Wed, 14 Aug 2024 08:49:28 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDRO-0003EG-Am for 72559@debbugs.gnu.org; Wed, 14 Aug 2024 08:49:26 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 235854425A4; Wed, 14 Aug 2024 08:48:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1723639724; bh=Fdbu7+7f/b3tRfG4vmJXj0iYx2VnyfIcJsnnLhtxo4c=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CUxR7tUmuccZn/989ToOkIj+DMdAKs/GtyckTYdT3j5nzCmf7TlFJA2X7ImqUTFgP xjaXnmsAURmD+BOPmJUwf/l84bQSqy6DJer1/D9OD+/4x8GsmdRfxiNf088NOB0Bcd OBhq2/Ogua4ADWZ96SagzDodvKtJD+X2VLMAVGA/ec5+bFpg4fdLxXRKsj+E2YbZxy vnYViRa756AaMYL2XZ6IRECzeesHPYO6bhImrnch9Ldx4izKgTytRt1cWb21I+P4td 6GS543tlfT1wC0otxJpEy7hg26Ur+7mN2/shlVDxVwb20/uf6cVBBkwnfuylXK8cfE 1DD6IODAFGSBw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CD5524424DA; Wed, 14 Aug 2024 08:48:44 -0400 (EDT) Received: from pastel (unknown [216.154.9.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 94F771201DA; Wed, 14 Aug 2024 08:48:44 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data In-Reply-To: (Stefan Monnier's message of "Wed, 14 Aug 2024 08:21:07 -0400") Message-ID: References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> Date: Wed, 14 Aug 2024 08:48:43 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.313 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, Pip Cet , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I think the patch below is in order (it partly undoes commit > a1f8702e8345). Yeah, yeah, Stefan diff --git a/lisp/profiler.el b/lisp/profiler.el index eb72f128c07..a5d62e20e3a 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -103,8 +103,13 @@ profiler-format ;;; Backtraces +(defun profiler-fixup-entry (entry) + (if (symbolp entry) + entry + (substring-no-properties (help-fns-function-name entry)))) + (defun profiler-fixup-backtrace (backtrace) - (apply #'vector (mapcar #'help-fns-function-name backtrace))) + (apply #'vector (mapcar #'profiler-fixup-entry backtrace))) ;;; Logs From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 06:04:07 2024 Received: (at 72559) by debbugs.gnu.org; 17 Aug 2024 10:04:07 +0000 Received: from localhost ([127.0.0.1]:53556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfGI3-0003YZ-9g for submit@debbugs.gnu.org; Sat, 17 Aug 2024 06:04:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfGI1-0003Y5-Ao for 72559@debbugs.gnu.org; Sat, 17 Aug 2024 06:04:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfGHI-0008OH-3V; Sat, 17 Aug 2024 06:03:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Hg1OsYyiMAU5Jh/Uy9vf9nfvJLTCQrLVAW1kxWV/ysY=; b=sDEIOUeqIRL5 0t0sskkjnd4NXUBFal1Sq9FhcZZwMmSjFIZyCHa4JJdAVKGmpZ3zvCQAKRBdkFMQaDpB1hf3BeIyv eLjjqhsY2lQE+YK8/eqVQbCHWsL2A7T5Zej5jUEN9oKSZ+bNkSwOxa1xgxjzk8qAcMDylcQMudw/3 PgLINVHsuwhXx1zjjfsqrp2oOzjDGMiUkiedF3JJdNjHQiXTIADvWIeixaxs7Om3LSQrZPKqlS0ki PLD1uFF52Rn9Lpmp1j1XRSurYxgEjG0IOS7QwVHOFPxkqrGLjL8PpEjtjzp5BHemYvAApj6+89W5b 82iE5ILI2EGxHC43hHyuTw==; Date: Sat, 17 Aug 2024 13:03:16 +0300 Message-Id: <86plq731qz.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Wed, 14 Aug 2024 08:48:43 -0400) Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, pipcet@protonmail.com, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: Pip Cet , yantar92@posteo.net, > 72559@debbugs.gnu.org > Date: Wed, 14 Aug 2024 08:48:43 -0400 > > > I think the patch below is in order (it partly undoes commit > > a1f8702e8345). > > Yeah, yeah, Thanks, installed on the emacs-30 branch. This seems to avoid errors, but I still see problems in the profile read from a file, which is displayed like this: Samples % Function 35 31% redisplay_internal (C function) 28 25% + command-execute 28 25% Automatic GC 8 7% + # 7 6% + ... 4 3% + # 2 1% + # Those "" thingies are actually written in the file as "#" strings, and I suspect that they should have been written as function objects, not as strings. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 10:08:49 2024 Received: (at 72559) by debbugs.gnu.org; 17 Aug 2024 14:08:49 +0000 Received: from localhost ([127.0.0.1]:54794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfK6r-00027Z-0l for submit@debbugs.gnu.org; Sat, 17 Aug 2024 10:08:49 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:14929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfK6o-00027I-MM for 72559@debbugs.gnu.org; Sat, 17 Aug 2024 10:08:47 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 08F21808A4; Sat, 17 Aug 2024 10:08:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1723903680; bh=suojfz2M/MMZREX3mNsGtswZ8aJ9fjbIg9sur/N9Uqk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FZuYIrOw5qtc1e5+0E2WGg9jr0ZhkHxbKOxEcGpyMBvXzDoDEugoKynAL0aAUbe1/ lO6bsES0g4NfWRG9oYZsQ9DFSC0+iSFEMGffpbH18Mm1BaLACo1XNl3sy4JBaIAf3V iYlQZdv9Xlb2/+EGSIDzsQ9QtQlZUJVQz/1v4RR+Vh1HOQSpG7fKka5CWmrl15I//7 Ns9uyDGBwyGg1AKm2wDo6OUb+gdSzMC+986BJVHFFH252cDPeoCVi7w1GFQnwSrZWi Gh8dWHoZZi2CTP9VbZfQiDz3gIkI2xSY/3FNEy4FUN9mcnK5pfPWFMnlLokk+084Gr OQ3WDfP/xZizQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8709B8014E; Sat, 17 Aug 2024 10:08:00 -0400 (EDT) Received: from alfajor (unknown [216.154.9.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4FE6A12062C; Sat, 17 Aug 2024 10:08:00 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data In-Reply-To: <86plq731qz.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Aug 2024 13:03:16 +0300") Message-ID: References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> <86plq731qz.fsf@gnu.org> Date: Sat, 17 Aug 2024 10:07:59 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.015 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, pipcet@protonmail.com, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > This seems to avoid errors, but I still see problems in the profile > read from a file, which is displayed like this: > > Samples % Function > 35 31% redisplay_internal (C function) > 28 25% + command-execute > 28 25% Automatic GC > 8 7% + # > 7 6% + ... > 4 3% + # > 2 1% + # > > Those "" thingies are actually written in the file as > "#" strings, and I suspect that they should > have been written as function objects, not as strings. 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. Better would be to print the "#" strings as-is instead of printing them as #. Of course, we could also try to print the function objects and then verify that they are printed readably and only print them as strings when that fails. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 10:28:34 2024 Received: (at 72559) by debbugs.gnu.org; 17 Aug 2024 14:28:35 +0000 Received: from localhost ([127.0.0.1]:54830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfKPy-0002iX-FW for submit@debbugs.gnu.org; Sat, 17 Aug 2024 10:28:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfKPw-0002iI-FY for 72559@debbugs.gnu.org; Sat, 17 Aug 2024 10:28:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfKPE-0003oT-5V; Sat, 17 Aug 2024 10:27:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9yyp6MWomaSAiH7oKfFb80iUP5kr8aHSOYG/VwlNS88=; b=IpgYYrbiEwp6 792xZba12R1WfhHwXwQ7/sEJcf0xM2Vy6tXMC88AR1Ki22+kAPZGl0mEJeJ6S0g052R8+2CVSrmXV EKX+fdN/UO6VLSG3m+dno2abbx7E7OPsmR9ibS6nNhxKgMAKBoBZQxt9ezDwSWkTomKijDf+WQDhl xXEK25kFYV75Li1VhELZ8EA+fuI9h8g9SnKSmUmGbF+U5WTeZUfWoQHAyR/VlPSObUS6YtFxJzv94 1QxaaW52f5lxLSJH2WRJLKZrw89tnIbzRkT0bmC+xyhl48lfB8rDHXPO9BikbfvU+UbKx8RFc9sMY VKwYwc+7mUKXC4v82aVbpQ==; Date: Sat, 17 Aug 2024 17:27:08 +0300 Message-Id: <86o75r1ayr.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Sat, 17 Aug 2024 10:07:59 -0400) Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> <86plq731qz.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, pipcet@protonmail.com, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: pipcet@protonmail.com, yantar92@posteo.net, 72559@debbugs.gnu.org > Date: Sat, 17 Aug 2024 10:07:59 -0400 > > > This seems to avoid errors, but I still see problems in the profile > > read from a file, which is displayed like this: > > > > Samples % Function > > 35 31% redisplay_internal (C function) > > 28 25% + command-execute > > 28 25% Automatic GC > > 8 7% + # > > 7 6% + ... > > 4 3% + # > > 2 1% + # > > > > Those "" thingies are actually written in the file as > > "#" strings, and I suspect that they should > > have been written as function objects, not as strings. > > 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? > Better would be to print the "#" strings > as-is instead of printing them as #. Again, Emacs 30 shows the functions called by such byte-compiled functions. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 13:36:01 2024 Received: (at 72559) by debbugs.gnu.org; 17 Aug 2024 17:36:02 +0000 Received: from localhost ([127.0.0.1]:54914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfNLN-0007kc-Ay for submit@debbugs.gnu.org; Sat, 17 Aug 2024 13:36:01 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfNLK-0007kP-Ia for 72559@debbugs.gnu.org; Sat, 17 Aug 2024 13:35:58 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0319E100044; Sat, 17 Aug 2024 13:35:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1723916108; bh=jSQAhZZ3Nfn0jkToQZnJe/j4/G5m/MVuD/HOQ173fME=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ngxbow/Et+ECSa5xh6BZ8kmh2kZEFa+PeP7vUTu/o4J+9JhiFNQdXGrM4gEk87NZI T+6tAT6Vzm2hc6jMcDhXt/Z+THnDM4miyfZ8GR1eb60YoWWpKgbSsLVFcC4U+dmaO/ aurxPPCGfiZyyE/yHwyLEcFa9eMpCtzNM+dICDNnYYlVrzK7LMeiuGuo/HIG0BDIeB KR4Ukbt9BN+vkb1HhqSzDpfNLEgQOtr+YgofiSY8Wo5Ya5P4WgYFcFizhyJ69AUhDQ Rvi8kZnUjq2nas11deTNRz3ha5V9A8qnAkRp0hW3FCLY0YDZq/fKyxTYt9cAGAzKz9 ss+tIBBoRBPHA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AC2CE100035; Sat, 17 Aug 2024 13:35:08 -0400 (EDT) Received: from alfajor (unknown [216.154.9.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 742A212021C; Sat, 17 Aug 2024 13:35:08 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data In-Reply-To: <86o75r1ayr.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Aug 2024 17:27:08 +0300") Message-ID: References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> <86plq731qz.fsf@gnu.org> <86o75r1ayr.fsf@gnu.org> Date: Sat, 17 Aug 2024 13:35:07 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.019 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559 Cc: 72559@debbugs.gnu.org, pipcet@protonmail.com, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> 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 "#" (sxhash entry))) ((byte-code-function-p entry) (format "#" (sxhash entry))) ((or (subrp entry) (symbolp entry) (stringp entry)) (format "%s" entry)) (t (format "#" (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. Stefan diff --git a/lisp/profiler.el b/lisp/profiler.el index a5d62e20e3a..34e4d7032df 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -452,6 +452,11 @@ profiler-report-make-entry-part (let ((string (cond ((eq entry t) "Others") + ;; When we save profile data into a file, the function + ;; objects are replaced with their "names". When we see + ;; a string here, that's presumably why, so just print + ;; it as-is. + ((stringp entry) entry) (t (propertize (help-fns-function-name entry) ;; Override the `button-map' which ;; otherwise adds RET, mouse-1, and TAB From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 13:50:14 2024 Received: (at 72559-done) by debbugs.gnu.org; 17 Aug 2024 17:50:15 +0000 Received: from localhost ([127.0.0.1]:54933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfNZ8-000879-Ik for submit@debbugs.gnu.org; Sat, 17 Aug 2024 13:50:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfNZ5-00086w-Tn for 72559-done@debbugs.gnu.org; Sat, 17 Aug 2024 13:50:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfNYL-000428-G2; Sat, 17 Aug 2024 13:49:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=38NVBUKBVFaWJ9GHdKCDbmz3Nknoz/U/WghFFR7fYmc=; b=gJYjaiDFtFew JE2r2wxqQfHCnHV7VVCFGXmt0T2O1MvwikCgeb8zmCpW1jEBLp2jtDTHdkTt+8AyLbBb4/Jo4LklI 8dXwAJrSWUjGzxm1+HOB2spU9BvnsPJ2XUoF8+RSrSq5GkGajXK7W/DY0N979ZqiYRyxurezYeUjz FArHm+QPAenfs/nLTjwlpbFVZP4opX4gIx64pS5Q8pga2CK3I/KVAUmgQjlxK8oAC5vVmjjMiaR3E zk4MBXY76X9BDV2v1teRPwmAjo5q08k75WYVlxAWJ+njc6QygmgZCxlWQDJtgPu9XYFSeUugu30Jz rSYrpt4GD5ldt/mf5K2WQw==; Date: Sat, 17 Aug 2024 20:49:22 +0300 Message-Id: <86h6bj11lp.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Sat, 17 Aug 2024 13:35:07 -0400) Subject: Re: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> <86plq731qz.fsf@gnu.org> <86o75r1ayr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72559-done Cc: pipcet@protonmail.com, 72559-done@debbugs.gnu.org, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > 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 "#" (sxhash entry))) > ((byte-code-function-p entry) > (format "#" (sxhash entry))) > ((or (subrp entry) (symbolp entry) (stringp entry)) > (format "%s" entry)) > (t > (format "#" (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. From unknown Mon Aug 18 11:17:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 15 Sep 2024 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator