Subject: bug#72559: 31.0.50; profiler-report-write-profile produced unreadable data

From: Stefan Monnier <[email-masked]>
Date: Wed, 14 Aug 2024 08:48:43 -0400

> 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