Shuffled profiler output added by CaptainRant on Thu Dec 11 00:44:15 2014
;; MAKEFILE START. CSC_FLAGS = -O3 -profile-name profiler.txt .PHONY: run clean all: main run: main ./$< && chicken-profile profiler.txt main: main.o foo.o bar.o unused.o csc $(CSC_FLAGS) $^ -o $@ # Main needs an extra target, since it depends on various input files. main.o: main.scm foo.o bar.o unused.o csc $(CSC_FLAGS) -J -c $< -o $@ %.o: %.scm csc $(CSC_FLAGS) -J -unit $(@:%.o=%) -c $< -o $@ clean: - rm main *.o *.import.scm ;; MAKEFILE END. ;; main.scm START. (module main () (import chicken scheme foo bar unused) (declare (uses foo bar unused)) (test-foo) (test-foo) (test-foo) (test-unused) (test-bar) (test-bar)) ;; main.scm END. ;; foo.scm START. module foo (test-foo) (import chicken scheme) (define (test-foo) (print "testing foo..."))) ;; foo.scm END. ;; bar.scm START. (module bar (test-bar) (import chicken scheme) (define (test-bar) (print "testing bar..."))) ;; bar.scm END. ;; unused.scm START. (module unused (test-unused) (import chicken scheme) (define (test-unused) (print "testing unused..."))) ;; unused.scm END. ;; OUTPUT (differs after each rebuild): parallel-bug $ make run ./main && chicken-profile profiler.txt testing foo... testing foo... testing foo... testing unused... testing bar... testing bar... reading `profiler.txt' ... procedure calls seconds average percent ---------------------------------------------------- unused#test-unused 0 0.000 0.000 0.000 bar#test-bar 0 0.000 0.000 0.000 foo#test-foo 0 0.000 0.000 0.000