master: Enable sb-profile test for mark-region

snuglas via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  a708727118bbe92967dee2f4880109b590b68087 (commit)
      from  fb23a271073031da08a1eeb492450648106dae5b (commit)

- Log -----------------------------------------------------------------
commit a708727118bbe92967dee2f4880109b590b68087
Author: Douglas Katzman <[email protected]>
Date:   Fri Apr 3 15:47:22 2026 -0400

    Enable sb-profile test for mark-region
    
    Another one which was skipped with no comment about why.
    Style changes: defvar -> defglobal, and do-symbols -> with-package-iterator
---
 src/code/profile.lisp   | 24 ++++++++++++------------
 tests/profile.pure.lisp |  1 -
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/code/profile.lisp b/src/code/profile.lisp
index 980d31410..6478ab893 100644
--- a/src/code/profile.lisp
+++ b/src/code/profile.lisp
@@ -80,7 +80,7 @@
 ;;; We associate a PROFILE-INFO structure with each profiled function
 ;;; name. This holds the functions that we call to manipulate the
 ;;; closure which implements the encapsulation.
-(defvar *profiled-fun-name->info*
+(define-load-time-global *profiled-fun-name->info*
   (make-hash-table
    ;; EQL testing isn't good enough for generalized function names
    ;; like (SETF FOO).
@@ -135,7 +135,7 @@
   ;; profiled call adds to the total runtime for the program
   (total (missing-arg) :type single-float :read-only t))
 (declaim (freeze-type overhead))
-(defvar *overhead*)
+(declaim (global *overhead*))
 (declaim (type overhead *overhead*))
 (makunbound '*overhead*) ; in case we reload this file when tweaking
 
@@ -250,16 +250,16 @@
        (legal-fun-name-or-type-error name)
        ;; Then we map onto it.
        (funcall function name))
-      (string (let ((package (find-undeleted-package-or-lose name)))
-                (do-symbols (symbol package)
-                  (when (eq (symbol-package symbol) package)
-                    (when (and (fboundp symbol)
-                               (not (macro-function symbol))
-                               (not (special-operator-p symbol)))
-                      (funcall function symbol))
-                    (let ((setf-name `(setf ,symbol)))
-                      (when (fboundp setf-name)
-                        (funcall function setf-name)))))))))
+      (string
+       (with-package-iterator (iter name :internal :external)
+         (loop (multiple-value-bind (flag symbol) (iter)
+                 (unless flag (return))
+                 (let ((fboundp (fboundp symbol)))
+                   (when (and fboundp (not (sb-impl::macro/special-guard-fun-p fboundp)))
+                     (funcall function symbol)))
+                 (let ((setf-name `(setf ,symbol)))
+                   (when (fboundp setf-name)
+                     (funcall function setf-name)))))))))
   (values))
 
 ;;; Profile the named function, which should exist and not be profiled
diff --git a/tests/profile.pure.lisp b/tests/profile.pure.lisp
index 6ec6db4a5..b88685440 100644
--- a/tests/profile.pure.lisp
+++ b/tests/profile.pure.lisp
@@ -11,7 +11,6 @@
 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
 ;;;; more information.
 
-#+mark-region-gc (invoke-restart 'run-tests::skip-file)
 (use-package "SB-THREAD")
 
 (defun miller-rabin-prime-p (n &optional (s 50))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.