From 63328f3a67e55ae58b4aa87aadafe2ad65453166 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 3 Jan 2007 18:41:13 +0100 Subject: [PATCH] switch on memory tracking, document how to use. --- Documentation/topdocs/INSTALL.texi | 6 +++++- scm/lily.scm | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index 23b1d21c10..0dc4d36e2d 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -116,7 +116,7 @@ software @item @uref{http://www.freetype.org/,FontConfig} (version 2.2). @item @uref{http://www.pango.org/,Pango} (version 1.12 or newer). @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE} -(version 1.8.2 or newer), or patch 1.8.x with +(version 1.8.2 or newer), or patch 1.8.1 with @uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.8-rational.patch}. @item @uref{http://www.python.org,Python} (version 2.4 or newer). @item @uref{http://www.ghostscript.com,Ghostscript} (version 8.15 or @@ -183,6 +183,10 @@ To rerun tests, use @noindent and then run @code{make check} again. +For tracking memory usage as part of this test, you will need GUILE +CVS; especially the following patch: +@uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.9-gcstats.patch}. + @section Building LilyPond diff --git a/scm/lily.scm b/scm/lily.scm index 55fdd0eeb3..d7233471aa 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -106,7 +106,8 @@ on errors, and print a stack trace.") ;; my display -(define-public (myd k v) (display k) (display ": ") (display v) (display ", ")) +(define-public (myd k v) (display k) (display ": ") (display v) (display ", ") + v) (define-public (print . args) (apply format (cons (current-output-port) args))) @@ -371,7 +372,7 @@ The syntax is the same as `define*-public'." (ly:assoc-get 'gc-time-taken stats)) ;; unreliable... - ;; (ly:assoc-get 'total-cells-allocated stats 0) + (ly:assoc-get 'total-cells-allocated stats 0) ;; difficult to put memory amount stats into here. ))) @@ -383,10 +384,9 @@ The syntax is the same as `define*-public'." (ly:progress "\nWriting timing to ~a..." outname) (format (open-file outname "w") -; "time: ~a\ncells: ~a\n" - "time: ~a\n" + "time: ~a\ncells: ~a\n" (car diff) -; (cadr diff) + (cadr diff) ))) -- 2.39.5