From: Han-Wen Nienhuys Date: Wed, 3 Jan 2007 17:41:13 +0000 (+0100) Subject: switch on memory tracking, document how to use. X-Git-Tag: release/2.11.9-1~58 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=63328f3a67e55ae58b4aa87aadafe2ad65453166;p=lilypond.git switch on memory tracking, document how to use. --- 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) )))