master: Suppress low-level event logging for #-sb-thread

snuglas via Sbcl-commits <[email protected]> Tue, 26 May 2026 05:32:26 +0000
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  891c77819e69a094a2f0297519d54d10d64c7d8c (commit)
      from  4ad7155f4fb38f5b54312169f7924fcf7b713a22 (commit)

- Log -----------------------------------------------------------------
commit 891c77819e69a094a2f0297519d54d10d64c7d8c
Author: Douglas Katzman <[email protected]>
Date:   Tue May 26 05:25:36 2026 +0000

    Suppress low-level event logging for #-sb-thread
    
    Could be made to avoid mention of pthread_self() but I doubt anyone needs it
---
 src/compiler/generic/genesis.lisp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp
index 6e0654473..b6abb1602 100644
--- a/src/compiler/generic/genesis.lisp
+++ b/src/compiler/generic/genesis.lisp
@@ -4564,6 +4564,9 @@ static char *event_printf_format[] = {~{~%  ~S~^,~}~%};~%#endif~2%"
             (mapcar (lambda (x) (count-printf-args (cadr x))) defs)
             (mapcar 'cadr defs))
     (dotimes (argc 7)
+      #-sb-thread
+      (format output "#define EVENT~D(id~A) { /* ignore */ }~%" argc (formals argc))
+      #+sb-thread
       (format output "#define EVENT~D(id~A) { if(should_record_event(id)) \\
  { int i_ = __sync_fetch_and_add(&n_logevents, ~A); if (i_ < EVENTBUFMAX) { \\
    eventdata[i_] = ((uword_t)pthread_self() << 2) | id;~

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


hooks/post-receive
-- 
SBCL