From: Stephen Adams Date: Wed, 2 Aug 1995 14:05:42 +0000 (+0000) Subject: Added some statistics gathering to help figure out why dbg-reduce is X-Git-Tag: 20090517-FFI~6081 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0c395c2bc06983e42deb5456c37299130e0cc2ad;p=mit-scheme.git Added some statistics gathering to help figure out why dbg-reduce is slow on huge programs. --- diff --git a/v8/src/compiler/midend/dbgred.scm b/v8/src/compiler/midend/dbgred.scm index 01cf10d3e..d05d67fc9 100644 --- a/v8/src/compiler/midend/dbgred.scm +++ b/v8/src/compiler/midend/dbgred.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: dbgred.scm,v 1.8 1995/07/21 14:28:53 adams Exp $ +$Id: dbgred.scm,v 1.9 1995/08/02 14:05:42 adams Exp $ Copyright (c) 1994-1995 Massachusetts Institute of Technology @@ -320,16 +320,18 @@ MIT in each case. |# (cond ((not entry) (vector (dbg-red/edge/make expr))) (else - (make-initialized-vector (1+ (vector-length entry)) - (lambda (i) - (if (< i (vector-length entry)) - (vector-ref entry i) - (dbg-red/edge/make expr))))))) + (vector-append entry + (vector (dbg-red/edge/make expr)))))) (if (and (not (scode-constant? key)) (not (%record? key)) (not entry)) (set! expressions (cons key expressions)))))) (cdr infos)) + (if compiler:enable-statistics? + (hash-table/for-each table + (lambda (key entry) + key + (sample/1 '(DBG-RED/OUT-DEGREE HISTOGRAM) (vector-length entry))))) (dbg-red/graph/make table expressions))) (define dbg-red/cache-sets 0)