]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
memory tracing refinements.
[lilypond.git] / scm / lily.scm
index b05c576c8e7905d3f41cfe4d8bce77d037e9a14d..cb1e593e3797010e0744a7c4743dc797756340bd 100644 (file)
@@ -70,7 +70,7 @@ on errors, and print a stack trace.")
              (safe #f "Run safely")
              (strict-infinity-checking #f "If yes, crash on encountering Inf/NaN.")
              (separate-log-files #f "Output to FILE.log per file.")
-             (trace-memory #f "Statistically record Scheme cell usage, and dump to file.")
+             (trace-memory-frequency #f "Record Scheme cell usage this many times per second, and dump to file.")
              (ttf-verbosity 0
                             "how much verbosity for TTF font embedding?")
              (show-available-fonts #f
@@ -122,7 +122,8 @@ on errors, and print a stack trace.")
 ;;; debugging evaluator is slower.  This should
 ;;; have a more sensible default.
 
-(if (ly:get-option 'verbose)
+(if (or (ly:get-option 'verbose)
+       (ly:get-option 'trace-memory-frequencency))
     (begin
       (ly:set-option 'protected-scheme-parsing #f)
       (debug-enable 'debug)
@@ -653,14 +654,14 @@ The syntax is the same as `define*-public'."
 
         (if separate-logs
             (ly:stderr-redirect (format "~a.log" base) "w"))
-        (if (ly:get-option 'trace-memory) 
-            (mtrace:start-trace 50))
+        (if (ly:get-option 'trace-memory-frequency
+            (mtrace:start-trace  (ly:get-option 'trace-memory-frequency)))
         
         (lilypond-file handler x)
         (if start-measurements
             (dump-profile x start-measurements (profile-measurements)))
 
-        (if (ly:get-option 'trace-memory)
+        (if (ly:get-option 'trace-memory-frequency)
             (begin
               (mtrace:stop-trace)
               (mtrace:dump-results base)))