summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/statprof.scm6
-rw-r--r--module/system/vm/frame.scm6
2 files changed, 6 insertions, 6 deletions
diff --git a/module/statprof.scm b/module/statprof.scm
index 8b90e6489..a36c21540 100644
--- a/module/statprof.scm
+++ b/module/statprof.scm
@@ -503,11 +503,7 @@ none is available."
(error "Can't call statprof-proc-call-data while profiler is running."))
(unless (program? proc)
(error "statprof-call-data only works for VM programs"))
- (let* ((code (program-code proc))
- (key (if (primitive-code? code)
- (procedure-name proc)
- code)))
- (hashv-ref (stack-samples->procedure-data state) key)))
+ (hashv-ref (stack-samples->procedure-data state) (program-code proc)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Stats
diff --git a/module/system/vm/frame.scm b/module/system/vm/frame.scm
index 1cf7af557..2491ed0e0 100644
--- a/module/system/vm/frame.scm
+++ b/module/system/vm/frame.scm
@@ -339,7 +339,7 @@
;;; Pretty printing
;;;
-;; Basically there are two cases to deal with here:
+;; Basically there are three cases to deal with here:
;;
;; 1. We've already parsed the arguments, and bound them to local
;; variables. In a standard (lambda (a b c) ...) call, this doesn't
@@ -353,6 +353,10 @@
;; number of arguments, or perhaps we're doing a typed dispatch and
;; the types don't match. In that case the arguments are all on the
;; stack, and nothing else is on the stack.
+;;
+;; 3. Alternately it's possible that we're between a primitive call
+;; and its associated return. In that case, we won't be able to
+;; say anything at all.
(define* (frame-call-representation frame #:key top-frame?)
(let* ((ip (frame-instruction-pointer frame))