From: Mark Harig <idirectscm@aim.com>
To: bug-guile@gnu.org
Subject: Re: ,show repl command
Date: Tue, 08 Feb 2011 23:42:11 -0500 [thread overview]
Message-ID: <8CD962AD993DA87-1B00-7AF0@webmail-m083.sysops.aol.com> (raw)
In-Reply-To: <8CD8949B6F936FD-F84-18E69@webmail-d083.sysops.aol.com>
>
> This is for guile 1.9.14.
>
...
This problem exists in 1.9.15, too:
>
> Error 2)
>
> scheme@(guile-user)> ,statistics
> GC times: 0 / 7 times
>
> Memory size: current / limit
> heap #f / #f cells
> malloc #f / #f bytes
>
> Cells collected: diff / total
> While executing meta-command:
> ERROR: In procedure -:
> ERROR: Wrong type argument in position 1: #f
>
The procedure `gc-stats' is not returning the alist that is expected
by the meta-command `statistics':
/usr/local/share/guile/2.0/system/repl/command.scm
(define-meta-command (statistics repl)
"statistics
Display statistics."
(let ((this-tms (times))
(this-gcs (gc-stats))
(last-tms (repl-tm-stats repl))
(last-gcs (repl-gc-stats repl)))
;; GC times
(let ((this-times (assq-ref this-gcs 'gc-times))
(last-times (assq-ref last-gcs 'gc-times)))
...
;; Cells collected
(let ((this-marked (assq-ref this-gcs 'cells-marked))
(last-marked (assq-ref last-gcs 'cells-marked))
(this-swept (assq-ref this-gcs 'cells-swept))
(last-swept (assq-ref last-gcs 'cells-swept)))
(display-stat-title "Cells collected:" "diff" "total")
(display-diff-stat "marked" #f this-marked last-marked "cells")
(display-diff-stat "swept" #f this-swept last-swept "cells")
But there are no elements in the alist returned by (gc-stats) that
have a key 'cells-marked or 'cells-swept, so `assq-ref' returns #f.
scheme@(guile-user)> ,statistics
GC times: 2 / 7 times
Memory size: current / limit
heap #f / #f cells
malloc #f / #f bytes
Cells collected: diff / total
While executing meta-command:
ERROR: In procedure -:
ERROR: Wrong type argument in position 1: #f
scheme@(guile-user)> (gc-stats)
$5 = ((gc-time-taken . 0) (heap-size . 29126656) (heap-free-size .
3182592) (heap-total-allocated . 29068480) (protected-objects . 110)
(gc-times . 7))
So, the argument `this' to the procedure `display-time-stat' has an
invalid value for subtraction.
Is the problem in guile/libguile/gc.c, which defines `gc-stats'?
Or, possibly, the problem is in guile/libguile/pairs.c, which defines
`scm_cons'?
Here are compilation errors that I am seeing when compiling
libguile/pairs.c:
...
make[3]: Entering directory `guile/make-1.9.15/libguile'
...
SNARF pairs.doc
guile-1.9.15/libguile/pairs.c:147:***Missing or erroneous `#define
FUNC_NAME s_scm_cdr'
guile-1.9.15/libguile/pairs.c:150:***Missing or erroneous #undef for
scm_car:
guile-1.9.15/libguile/pairs.c:155:***Missing or erroneous `#define
FUNC_NAME s_scm_cddr'
guile-1.9.15/libguile/pairs.c:158:***Missing or erroneous #undef for
scm_cdar:
guile-1.9.15/libguile/pairs.c:163:***Missing or erroneous `#define
FUNC_NAME s_scm_cadr'
guile-1.9.15/libguile/pairs.c:166:***Missing or erroneous #undef for
scm_caar:
guile-1.9.15/libguile/pairs.c:171:***Missing or erroneous `#define
FUNC_NAME s_scm_cdddr'
guile-1.9.15/libguile/pairs.c:174:***Missing or erroneous #undef for
scm_cddar:
guile-1.9.15/libguile/pairs.c:179:***Missing or erroneous `#define
FUNC_NAME s_scm_cdadr'
guile-1.9.15/libguile/pairs.c:182:***Missing or erroneous #undef for
scm_cdaar:
guile-1.9.15/libguile/pairs.c:187:***Missing or erroneous `#define
FUNC_NAME s_scm_caddr'
guile-1.9.15/libguile/pairs.c:190:***Missing or erroneous #undef for
scm_cadar:
guile-1.9.15/libguile/pairs.c:195:***Missing or erroneous `#define
FUNC_NAME s_scm_caadr'
guile-1.9.15/libguile/pairs.c:198:***Missing or erroneous #undef for
scm_caaar:
guile-1.9.15/libguile/pairs.c:203:***Missing or erroneous `#define
FUNC_NAME s_scm_cddddr'
guile-1.9.15/libguile/pairs.c:206:***Missing or erroneous #undef for
scm_cdddar:
guile-1.9.15/libguile/pairs.c:211:***Missing or erroneous `#define
FUNC_NAME s_scm_cddadr'
guile-1.9.15/libguile/pairs.c:214:***Missing or erroneous #undef for
scm_cddaar:
guile-1.9.15/libguile/pairs.c:219:***Missing or erroneous `#define
FUNC_NAME s_scm_cdaddr'
guile-1.9.15/libguile/pairs.c:222:***Missing or erroneous #undef for
scm_cdadar:
guile-1.9.15/libguile/pairs.c:227:***Missing or erroneous `#define
FUNC_NAME s_scm_cdaadr'
guile-1.9.15/libguile/pairs.c:230:***Missing or erroneous #undef for
scm_cdaaar:
guile-1.9.15/libguile/pairs.c:235:***Missing or erroneous `#define
FUNC_NAME s_scm_cadddr'
guile-1.9.15/libguile/pairs.c:238:***Missing or erroneous #undef for
scm_caddar:
guile-1.9.15/libguile/pairs.c:243:***Missing or erroneous `#define
FUNC_NAME s_scm_cadadr'
guile-1.9.15/libguile/pairs.c:246:***Missing or erroneous #undef for
scm_cadaar:
guile-1.9.15/libguile/pairs.c:251:***Missing or erroneous `#define
FUNC_NAME s_scm_caaddr'
guile-1.9.15/libguile/pairs.c:254:***Missing or erroneous #undef for
scm_caadar:
guile-1.9.15/libguile/pairs.c:259:***Missing or erroneous `#define
FUNC_NAME s_scm_caaadr'
guile-1.9.15/libguile/pairs.c:262:***Missing or erroneous #undef for
scm_caaaar:
SNARF ports.doc
...
--
next prev parent reply other threads:[~2011-02-09 4:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 14:23 ,show repl command Ramakrishnan Muthukrishnan
2011-01-23 14:24 ` Ramakrishnan Muthukrishnan
2011-01-23 19:20 ` Mark Harig
2011-02-09 4:42 ` Mark Harig [this message]
2011-02-09 5:00 ` Mark Harig
2011-03-04 9:34 ` Andy Wingo
2011-01-26 22:43 ` Andy Wingo
2011-01-28 17:35 ` Andreas Rottmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CD962AD993DA87-1B00-7AF0@webmail-m083.sysops.aol.com \
--to=idirectscm@aim.com \
--cc=bug-guile@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).