summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-09-16 12:03:10 +0200
committerAndy Wingo <wingo@pobox.com>2010-09-16 12:03:10 +0200
commit7c42238610dbf5780d9aeb12ca799c83f9f6167e (patch)
tree9ac4d877ea90a16d28191e9844ded71db237f03c
parentf1ee6d54d219056c62d87a8e4a6b199162c946e8 (diff)
downloadguile-7c42238610dbf5780d9aeb12ca799c83f9f6167e.tar.gz
remove unused (system vm profile)
* module/Makefile.am: * module/system/vm/profile.scm: Remove (system vm profile). We use statprof.
-rw-r--r--module/Makefile.am2
-rw-r--r--module/system/vm/profile.scm64
2 files changed, 1 insertions, 65 deletions
diff --git a/module/Makefile.am b/module/Makefile.am
index ef5b25f69..e5751681b 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -311,13 +311,13 @@ SYSTEM_SOURCES = \
system/vm/frame.scm \
system/vm/instruction.scm \
system/vm/objcode.scm \
- system/vm/profile.scm \
system/vm/program.scm \
system/vm/trace.scm \
system/vm/vm.scm \
system/foreign.scm \
system/xref.scm \
system/repl/debug.scm \
+ system/repl/hook-state.scm \
system/repl/error-handling.scm \
system/repl/common.scm \
system/repl/command.scm \
diff --git a/module/system/vm/profile.scm b/module/system/vm/profile.scm
deleted file mode 100644
index 6ab418ac3..000000000
--- a/module/system/vm/profile.scm
+++ /dev/null
@@ -1,64 +0,0 @@
-;;; Guile VM profiler
-
-;; Copyright (C) 2001 Free Software Foundation, Inc.
-
-;;; This library is free software; you can redistribute it and/or
-;;; modify it under the terms of the GNU Lesser General Public
-;;; License as published by the Free Software Foundation; either
-;;; version 3 of the License, or (at your option) any later version.
-;;;
-;;; This library is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;;; Lesser General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU Lesser General Public
-;;; License along with this library; if not, write to the Free Software
-;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-;;; Code:
-
-(define-module (system vm profile)
- #:use-module (system vm vm)
- #:use-module (ice-9 format)
- #:export (vm-profile))
-
-(define (vm-profile vm objcode . opts)
- (let ((flag (vm-option vm 'debug)))
- (dynamic-wind
- (lambda ()
- (set-vm-option! vm 'debug #t)
- (set-vm-option! vm 'profile-data '())
- (add-hook! (vm-next-hook vm) profile-next)
- (add-hook! (vm-enter-hook vm) profile-enter)
- (add-hook! (vm-exit-hook vm) profile-exit))
- (lambda ()
- (vm-load vm objcode)
- (print-result vm))
- (lambda ()
- (set-vm-option! vm 'debug flag)
- (remove-hook! (vm-next-hook vm) profile-next)
- (remove-hook! (vm-enter-hook vm) profile-enter)
- (remove-hook! (vm-exit-hook vm) profile-exit)))))
-
-(define (profile-next vm)
- (set-vm-option! vm 'profile-data
- (cons (vm-fetch-code vm) (vm-option vm 'profile-data))))
-
-(define (profile-enter vm)
- #f)
-
-(define (profile-exit vm)
- #f)
-
-(define (print-result vm . opts)
- (do ((data (vm-option vm 'profile-data) (cdr data))
- (summary '() (let ((inst (caar data)))
- (assq-set! summary inst
- (1+ (or (assq-ref summary inst) 0))))))
- ((null? data)
- (display "Count Instruction\n")
- (display "----- -----------\n")
- (for-each (lambda (entry)
- (format #t "~5@A ~A\n" (cdr entry) (car entry)))
- (sort summary (lambda (e1 e2) (> (cdr e1) (cdr e2))))))))