guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] branch master updated: Statprof reports primitive names


From: Andy Wingo
Subject: [Guile-commits] branch master updated: Statprof reports primitive names
Date: Thu, 04 Jun 2020 05:48:17 -0400

This is an automated email from the git hooks/post-receive script.

wingo pushed a commit to branch master
in repository guile.

The following commit(s) were added to refs/heads/master by this push:
     new df22eb5  Statprof reports primitive names
df22eb5 is described below

commit df22eb59567e2195170930ea836e21bbf249ac91
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Thu Jun 4 11:46:34 2020 +0200

    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.
---
 module/statprof.scm | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/module/statprof.scm b/module/statprof.scm
index 33eac44..e334c2b 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]