Skip to content

Commit

Permalink
Fix it so we use the -o option vs just gxprof.out (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
ober authored Nov 16, 2023
1 parent 3ef2170 commit e636e36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tools/gxprof.ss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
(let* ((ctx (import-module (module-path .module) #f #t))
(main-id (find-runtime-symbol ctx 'main))
(main-fn (eval main-id)))
(profile main-fn .module-args .heartbeat))
(profile main-fn .module-args .heartbeat .output))
(analyze .output .?ignore-kernel-frames))))

(def (module-path str)
Expand Down Expand Up @@ -66,14 +66,14 @@
(else
(error "module does not export symbol" (expander-context-id ctx) id))))

(def (profile fun args heartbeat)
(def (profile fun args heartbeat output)
(try
(dynamic-wind
(cut profile-start! heartbeat)
(cut apply fun args)
profile-end!)
(finally
(call-with-output-file "gxprof.out" (cut write-samples samples <>)))))
(finally
(call-with-output-file output (cut write-samples samples <>)))))

(def samples [])

Expand Down

0 comments on commit e636e36

Please sign in to comment.