summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-06-04 11:46:34 +0200
committerAndy Wingo <wingo@pobox.com>2020-06-04 11:46:34 +0200
commitdf22eb59567e2195170930ea836e21bbf249ac91 (patch)
treee7e59b4670c94b8df4cbeef3bbf7e1212ca29f30 /module
parente2066d2e639ecc81078e83fcd7acd8b75faf27a3 (diff)
downloadguile-df22eb59567e2195170930ea836e21bbf249ac91.tar.gz
Statprof reports primitive names
* module/statprof.scm (program-debug-info-printable): Remove unused function. (addr->printable): If the addr is a primitive, extract its name.
Diffstat (limited to 'module')
-rw-r--r--module/statprof.scm10
1 files changed, 1 insertions, 9 deletions
diff --git a/module/statprof.scm b/module/statprof.scm
index 33eac4468..e334c2beb 100644
--- a/module/statprof.scm
+++ b/module/statprof.scm
@@ -370,15 +370,6 @@ always collects full stacks.)"
(source-line-for-user source)
(source-column source)))
-(define (program-debug-info-printable pdi)
- (let* ((addr (program-debug-info-addr pdi))
- (name (or (and=> (program-debug-info-name pdi) symbol->string)
- (string-append "#x" (number->string addr 16))))
- (loc (and=> (find-source-for-addr addr) source->string)))
- (if loc
- (string-append name " at " loc)
- name)))
-
(define (addr->pdi addr cache)
(cond
((hashv-get-handle cache addr) => cdr)
@@ -389,6 +380,7 @@ always collects full stacks.)"
(define (addr->printable addr pdi)
(or (and=> (and=> pdi program-debug-info-name) symbol->string)
+ (and=> (primitive-code-name addr) symbol->string)
(string-append "anon #x" (number->string addr 16))))
(define (inc-call-data-cum-sample-count! cd)