-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflamegraph.scm
More file actions
27 lines (16 loc) · 1023 Bytes
/
flamegraph.scm
File metadata and controls
27 lines (16 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;;;============================================================================
;;; File: "flamegraph.scm"
;;; Copyright (c) 2025 by Marc Feeley, All Rights Reserved.
;;;============================================================================
;;; Generate a flamegraph for the current program.
;; See the README file for license and usage information.
(##include "~~lib/gambit/prim/prim#.scm") ;; map fx+ to ##fx+, etc
(##include "~~lib/_gambit#.scm") ;; for macro-check-string,
;; macro-absent-obj, etc
(declare (extended-bindings)) ;; ##fx+ is bound to fixnum addition, etc
(declare (not safe)) ;; claim code has no type errors
(declare (block)) ;; claim no global is assigned
;;;============================================================================
(##add-exit-job! (lambda () (statprof-stop!) (statprof-write!)))
(statprof-start! '(flamegraph))
;;;============================================================================