[slime-cvs] CVS update: slime/swank-loader.lisp slime/swank-clisp.lisp
Wolfgang Jenkner
wjenkner at common-lisp.net
Thu Feb 5 05:57:05 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv16065
Modified Files:
swank-loader.lisp swank-clisp.lisp
Log Message:
Add profiling support via Kantrowitz's metering package. Reporting
needs to be refined (profile-package currently ignores callers-p and
methods).
Date: Thu Feb 5 00:57:04 2004
Author: wjenkner
Index: slime/swank-loader.lisp
diff -u slime/swank-loader.lisp:1.15 slime/swank-loader.lisp:1.16
--- slime/swank-loader.lisp:1.15 Wed Jan 21 19:09:15 2004
+++ slime/swank-loader.lisp Thu Feb 5 00:57:04 2004
@@ -7,7 +7,7 @@
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
;;;
-;;; $Id: swank-loader.lisp,v 1.15 2004/01/22 00:09:15 heller Exp $
+;;; $Id: swank-loader.lisp,v 1.16 2004/02/05 05:57:04 wjenkner Exp $
;;;
(cl:defpackage :swank-loader
@@ -32,7 +32,7 @@
#+openmcl '("swank-openmcl" "swank-gray")
#+lispworks '("swank-lispworks" "swank-gray")
#+allegro '("swank-allegro" "swank-gray")
- #+clisp '("xref" "swank-clisp" "swank-gray")
+ #+clisp '("xref" "metering" "swank-clisp" "swank-gray")
))
(defparameter *swank-pathname* (make-swank-pathname "swank"))
Index: slime/swank-clisp.lisp
diff -u slime/swank-clisp.lisp:1.15 slime/swank-clisp.lisp:1.16
--- slime/swank-clisp.lisp:1.15 Sat Jan 31 06:50:25 2004
+++ slime/swank-clisp.lisp Thu Feb 5 00:57:04 2004
@@ -15,8 +15,16 @@
;;; This code is developed using the current CVS version of CLISP and
;;; CLISP 2.32 on Linux. Older versions may not work (2.29 and below
;;; are confirmed non-working; please upgrade). You need an image
-;;; containing the "SOCKET", "REGEXP", and (optionally) "LINUX"
-;;; packages.
+;;; containing the "SOCKET", "REGEXP", and "LINUX" packages. The
+;;; portable xref from the CMU AI repository and metering.lisp from
+;;; CLOCC are also required (alternatively, you have to manually
+;;; comment out some code below). Note that currently SLIME comes
+;;; with xref but not with metering. Please fetch it from
+
+;;; http://cvs.sourceforge.net/viewcvs.py/clocc/clocc/src/tools/metering/
+
+;;; and put it (or a link to it) in the directory containing the other
+;;; SLIME source files.
(in-package "SWANK")
@@ -328,6 +336,30 @@
(defslimefun sldb-abort ()
(invoke-restart (find 'abort *sldb-restarts* :key #'restart-name)))
+
+;;; Profiling
+
+(defimplementation profile (fname)
+ (eval `(mon:monitor ,fname))) ;monitor is a macro
+
+(defimplementation profiled-functions ()
+ mon:*monitored-functions*)
+
+(defimplementation unprofile (fname)
+ (eval `(mon:unmonitor ,fname))) ;unmonitor is a macro
+
+(defimplementation unprofile-all ()
+ (mon:unmonitor))
+
+(defimplementation profile-report ()
+ (mon:report-monitoring))
+
+(defimplementation profile-reset ()
+ (mon:reset-all-monitoring))
+
+(defimplementation profile-package (package callers-p methods)
+ (declare (ignore callers-p methods))
+ (mon:monitor-all package))
;;; Handle compiler conditions (find out location of error etc.)
More information about the slime-cvs
mailing list