(debug-lexer #f "debug the flex lexer")
(debug-midi #f "generate human readable MIDI")
(debug-parser #f "debug the bison parser")
+ (debug-skylines #f "debug skylines")
(delete-intermediate-files #f
"delete unusable PostScript files")
(dump-signatures #f "dump output signatures of each system")
(if (ly:get-option 'verbose)
(ly:progress "[~A" file-name))
(if (not file-name)
- (ly:error (_ "Can't find ~A" x)))
+ (ly:error (_ "Can't find ~A") x))
(primitive-load file-name)
(if (ly:get-option 'verbose)
(ly:progress "]"))))
".scm"))
(outfile (open-file out-file-name "w")))
- (display (format "Dumping gc protected objs to ~a...\n" out-file-name))
+ (display (format "Dumping GC statistics ~a...\n" out-file-name))
(display
(map (lambda (y)
(let ((x (car y))
(c (cdr y)))
-
- (string-append
- (string-join
- (map object->string (list (object-address x) c x))
- " ")
- "\n")))
-
+ (display
+ (format "~a (~a) = ~a\n" (object-address x) c x)
+ outfile)))
(filter
(lambda (x)
(not (symbol? (car x))))
protects))
outfile)
- ; (display (ly:smob-protects))
+ (format outfile "\nprotected symbols: ~a\n"
+ (length (filter symbol? (map car protects))))
+
+
+
+ ;; (display (ly:smob-protects))
(newline outfile)
(if (defined? 'gc-live-object-stats)
(let* ((stats #f))
(display "Live object statistics: GC'ing\n")
+ (ly:reset-all-fonts)
(gc)
(gc)
(ly:set-option 'debug-gc-assert-parsed-dead #t)
(gc)
-
+ (ly:set-option 'debug-gc-assert-parsed-dead #f)
+
(set! stats (gc-live-object-stats))
(display "Dumping live object statistics.\n")
(format outfile "~a: ~a\n" (car x) (cdr x)))
(sort (gc-live-object-stats)
(lambda (x y)
- (string<? (car x) (car y)))))))))
+ (string<? (car x) (car y)))))))
+
+
+ (newline outfile)
+ (let*
+ ((stats (gc-stats)))
+
+ (for-each
+ (lambda (sym)
+ (display
+ (format "~a ~a ~a\n"
+ gc-protect-stat-count
+ sym
+ (let ((sym-stat (assoc sym stats)))
+ (if sym-stat
+ (cdr sym-stat)
+ "?")))
+ outfile))
+ '(protected-objects bytes-malloced cell-heap-size
+
+ )))
+
+ ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (null? files)
(no-files-handler))
+ (if (ly:get-option 'read-file-list)
+ (set! files
+ (filter (lambda (s)
+ (> (string-length s) 0))
+ (apply append
+ (map (lambda (f) (string-split (ly:gulp-file f) #\nl))
+ files)))
+ ))
+
(if (and (number? (ly:get-option 'job-count))
(> (length files) (ly:get-option 'job-count)))
(set! files (vector-ref split-todo joblist)))
(begin
+ (ly:progress "\nForking into jobs: ~a\n" joblist)
(for-each
(lambda (pid)
(let* ((stat (cdr (waitpid pid))))
(ly:get-option 'log-file) x))
(log (ly:gulp-file logfile))
(len (string-length log))
- (tail (substring log (- len 1024))))
+ (tail (substring log (max 0 (- len 1024)))))
(display (format "\n\nlogfile ~a:\n\n ~a" logfile tail))))
(exit 0)))))
(define-public (lilypond-all files)
- (if (ly:get-option 'read-file-list)
- (set! files
- (filter (lambda (s)
- (> (string-length s) 0))
- (apply append
- (map (lambda (f) (string-split (ly:gulp-file f) #\nl))
- files)))
- ))
+
(if (ly:get-option 'show-available-fonts)
(begin
(for-each
(lambda (x)
- (ly:set-option 'debug-gc-assert-parsed-dead #f)
(lilypond-file handler x)
(ly:clear-anonymous-modules)
(if (ly:get-option 'debug-gc)
- (dump-gc-protects)))
-
+ (dump-gc-protects)
+ (if (= (random 40) 1)
+ (ly:reset-all-fonts))))
+
files)
failed))