mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
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.
This commit is contained in:
parent
e2066d2e63
commit
df22eb5956
1 changed files with 1 additions and 9 deletions
|
@ -370,15 +370,6 @@ always collects full stacks.)"
|
||||||
(source-line-for-user source)
|
(source-line-for-user source)
|
||||||
(source-column 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)
|
(define (addr->pdi addr cache)
|
||||||
(cond
|
(cond
|
||||||
((hashv-get-handle cache addr) => cdr)
|
((hashv-get-handle cache addr) => cdr)
|
||||||
|
@ -389,6 +380,7 @@ always collects full stacks.)"
|
||||||
|
|
||||||
(define (addr->printable addr pdi)
|
(define (addr->printable addr pdi)
|
||||||
(or (and=> (and=> pdi program-debug-info-name) symbol->string)
|
(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))))
|
(string-append "anon #x" (number->string addr 16))))
|
||||||
|
|
||||||
(define (inc-call-data-cum-sample-count! cd)
|
(define (inc-call-data-cum-sample-count! cd)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue