From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data Date: Sat, 17 Aug 2024 20:49:22 +0300 Message-ID: <86h6bj11lp.fsf@gnu.org> References: <87wmko35yn.fsf@localhost> <877ccomqg3.fsf@protonmail.com> <867ccojqsd.fsf@gnu.org> <86plq731qz.fsf@gnu.org> <86o75r1ayr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16538"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, 72559-done@debbugs.gnu.org, yantar92@posteo.net To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 17 19:50:42 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sfNZY-00048b-NA for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Aug 2024 19:50:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfNZJ-0003DI-Tt; Sat, 17 Aug 2024 13:50:25 -0400 Original-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 1sfNZH-0003Ch-LK for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 13:50:23 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfNZH-0004HQ-9N for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 13:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=38NVBUKBVFaWJ9GHdKCDbmz3Nknoz/U/WghFFR7fYmc=; b=OFq65WRZc4wQHkGHaN/uCicstJ6XHRRixjdJe8p7i/IW3rHctZ4BlaF2IdrZZuDJ+fYj04L+6pSSeKYjybcx1j4I3agcAFNPi0MR4qtoTUQ0sQsCiPVzUHbck8rdeG83ZVe1VkCb9xzLwAv/f8KXZRmBhZN3pJOJgWKyu62z4CDxBHyxcRI4yH9sfFCaQDVeRM5gjJf5Eve1M+Fl0bXSLF1nQlPCXwlOVyDzxDIdLNQeify4FDxqtr6iWc5H5Mw+7dQyBdWIQQbaazdgnUFJkY3Z5B2eb4Tq52JwVQcAq/KEaEh59GnIPVxLbU+QnjzV+Xs/FkRXA7X1/TjmLyHniA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfNZu-00088S-EH for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 13:51:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Aug 2024 17:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 72559 X-GNU-PR-Package: emacs Mail-Followup-To: 72559@debbugs.gnu.org, eliz@gnu.org, yantar92@posteo.net Original-Received: via spool by 72559-done@debbugs.gnu.org id=D72559.172391701531200 (code D ref 72559); Sat, 17 Aug 2024 17:51:02 +0000 Original-Received: (at 72559-done) by debbugs.gnu.org; 17 Aug 2024 17:50:15 +0000 Original-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 Original-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 Original-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==; In-Reply-To: (message from Stefan Monnier on Sat, 17 Aug 2024 13:35:07 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290276 Archived-At: > 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.