Fix dumping of Lisp profiles
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 14 Aug 2024 12:48:43 +0000 (08:48 -0400)
committerEli Zaretskii <eliz@gnu.org>
Sat, 17 Aug 2024 09:50:26 +0000 (12:50 +0300)
* lisp/profiler.el (profiler-fixup-entry): New function.
(profiler-fixup-backtrace): Use it.  (Bug#72559)

lisp/profiler.el

index eb72f128c0765a3e6901156606ce861a20635b19..a5d62e20e3aa4abcb970914dfd6ad5b14b23115d 100644 (file)
 \f
 ;;; 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)))
 
 \f
 ;;; Logs