\f
;;;; Miscellaneous Kludgerosity
-(define (compiled-entry? object)
- (object-type? (ucode-type compiled-entry) object))
-
(define event-return-address 'uninitialized)
(define (initialize-package!)
(if (eq? stack-frame-type/compiled-return-address
(stack-frame/type stack-frame))
(parameterize ((stack-sampling-return-address
- (stack-frame/return-address stack-frame)))
- (thunk))
+ (stack-frame/return-address stack-frame)))
+ (thunk))
(thunk)))))))
\f
;;;; Profile Data
(else (find-subproblem stack-frame)))))
(define (find-subproblem stack-frame)
- (if (compiled-entry? (stack-frame/return-address stack-frame))
+ (if (compiled-code-address? (stack-frame/return-address stack-frame))
stack-frame
(find-next-subproblem stack-frame)))
(define (intern-entry profile stack-frame)
(let ((return-address (stack-frame/return-address stack-frame)))
- (if (compiled-entry? return-address)
+ (if (compiled-code-address? return-address)
(let ((return-address
(if (compiled-closure? return-address)
(compiled-closure->entry return-address)
(let ((entries (hash-table-values (profile.entries profile))))
(define (sortem entry.count)
(sort (remove (lambda (e) (zero? (entry.count e)))
- entries)
+ entries)
(lambda (a b) (< (entry.count a) (entry.count b)))))
(let ((sampled (sortem entry.sampled-count))
(waiting (sortem entry.waiting-count)))
(define (profile-pp expression output-port)
;; Random parametrization.
(parameterize ((param:printer-list-breadth-limit 5)
- (param:printer-list-depth-limit 3)
- (param:printer-string-length-limit 40)
- (param:print-primitives-by-name? #t)
- (param:pp-save-vertical-space? #t)
- (param:pp-default-as-code? #t))
+ (param:printer-list-depth-limit 3)
+ (param:printer-string-length-limit 40)
+ (param:print-primitives-by-name? #t)
+ (param:pp-save-vertical-space? #t)
+ (param:pp-default-as-code? #t))
(pp expression output-port)))
\ No newline at end of file