0.8.13.6:

Merge disassembly integration in sb-sprof (Juho Snellman
	26-07-2004 sbcl-devel)
	... deeply cute.
This commit is contained in:
Christophe Rhodes 2004-07-27 11:49:33 +00:00
parent a87f7ecb8b
commit 6a1dcd75ab
4 changed files with 34 additions and 8 deletions

View file

@ -549,7 +549,9 @@ Paul Dietz:
analysis phase in the compiler.
Brian Downing:
He fixed the linker problems for building SBCL on Mac OS X.
He fixed the linker problems for building SBCL on Mac OS X. He
found and fixed the cause of backtraces failing for undefined
functions and assembly routines.
Miles Egan:
He creates binary packages of SBCL releases for Red Hat and other
@ -673,7 +675,9 @@ Nikodemus Siivola:
Juho Snellman:
He provided several performance enhancements, including a better hash
function on strings, and removal of unneccessary bounds checks.
function on strings, and removal of unneccessary bounds checks. He
ported and enhanced the statistical profiler written by Gerd
Moellmann for CMU CL.
Brian Spilsbury:
He wrote Unicode-capable versions of SBCL's character, string, and

View file

@ -84,9 +84,6 @@
;;;
;;; Random ideas for implementation:
;;;
;;; * Show a disassembly of a function annotated with sampling
;;; information.
;;;
;;; * Space profiler. Sample when new pages are allocated instead of
;;; at SIGPROF.
;;;
@ -1123,6 +1120,26 @@
((nil)))
graph))
;;; Interface to DISASSEMBLE
(defun add-disassembly-profile-note (chunk stream dstate)
(declare (ignore chunk stream))
(unless (zerop *samples-index*)
(let* ((location
(+ (sb-disassem::seg-virtual-location
(sb-disassem:dstate-segment dstate))
(sb-disassem::dstate-cur-offs dstate)))
(samples (loop for x from 0 below *samples-index* by +sample-size+
summing (if (= (aref *samples* x) location)
1
0))))
(unless (zerop samples)
(sb-disassem::note (format nil "~A/~A samples"
samples (/ *samples-index* +sample-size+))
dstate)))))
(pushnew 'add-disassembly-profile-note sb-disassem::*default-dstate-hooks*)
;;; silly examples
(defun test-0 (n &optional (depth 0))

View file

@ -30,6 +30,11 @@ and the deficiency on the Alpha will eventually be rectified.
(sb-sprof:report)
@end lisp
The profiler hooks into the disassembler such that instructions which
have been sampled are annotated with their relative frequency of
sampling. This information is not stored across different sampling
runs. @c FIXME: maybe it should be?
@subsection Functions
@include fun-sb-sprof-report.texinfo
@ -52,5 +57,5 @@ and the deficiency on the Alpha will eventually be rectified.
@subsection Credits
@code{sb-sprof} is an SBCL port of Gerd Moellmann's statistical profiler
for CMUCL.
@code{sb-sprof} is an SBCL port, with enhancements, of Gerd
Moellmann's statistical profiler for CMUCL.

View file

@ -17,4 +17,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".)
"0.8.13.5"
"0.8.13.6"