From 4d23f1a95bcd8b8907db4a9597b41bf394a34c40 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 20 Feb 2011 10:19:47 +0000 Subject: [PATCH] 1.0.46.2: SB-SPROF: fix threaded wallclock profiling on x86-64 Type error due to reversed argument types in pthread_kill definition. --- NEWS | 2 ++ contrib/sb-sprof/sb-sprof.lisp | 10 ++++++---- version.lisp-expr | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 6eb7420..0cfc5f0 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ changes relative to sbcl-1.0.46: * bug fix: SB-DEBUG:BACKTRACE-AS-LIST guards against potentially leaking stack-allocated values out of their dynamic-extent. (lp#310175) + * bug fix: attempts to use SB-SPROF for wallclock profiling on threaded + x86-64 builds caused a type-error. changes in sbcl-1.0.46 relative to sbcl-1.0.45: * enhancement: largefile support on Solaris. diff --git a/contrib/sb-sprof/sb-sprof.lisp b/contrib/sb-sprof/sb-sprof.lisp index b7a9dcc..7d2374e 100644 --- a/contrib/sb-sprof/sb-sprof.lisp +++ b/contrib/sb-sprof/sb-sprof.lisp @@ -492,9 +492,10 @@ profiling") (defun profiled-threads () (let ((profiled-threads *profiled-threads*)) - (if (eq :all profiled-threads) - (remove *timer-thread* (sb-thread:list-all-threads)) - profiled-threads))) + (remove *timer-thread* + (if (eq :all profiled-threads) + (sb-thread:list-all-threads) + profiled-threads)))) (defun profiled-thread-p (thread) (let ((profiled-threads *profiled-threads*)) @@ -508,7 +509,8 @@ profiling") (defvar *profiler-lock* (sb-thread:make-mutex :name "Statistical Profiler")) (defvar *distribution-lock* (sb-thread:make-mutex :name "Wallclock profiling lock")) - (define-alien-routine pthread-kill int (signal int) (os-thread unsigned-long)) + (declaim (inline pthread-kill)) + (define-alien-routine pthread-kill int (os-thread unsigned-long) (signal int)) ;;; A random thread will call this in response to either a timer firing, ;;; This in turn will distribute the notice to those threads we are diff --git a/version.lisp-expr b/version.lisp-expr index 759ad3a..b591435 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -20,4 +20,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.46.1" +"1.0.46.2" -- 1.7.10.4