Mercurial > hg > xemacs-beta
comparison lisp/diagnose.el @ 3041:876730d84b73
[xemacs-hg @ 2005-11-02 03:26:51 by crestani]
2005-11-02 Marcus Crestani <crestani@xemacs.org>
* diagnose.el: Rename `show-lrecord-stats' to
`show-object-memory-usage-stats', to keep in sync with the C
sources.
author | crestani |
---|---|
date | Wed, 02 Nov 2005 03:26:52 +0000 |
parents | 05d62157e048 |
children | a88e6130a523 |
comparison
equal
deleted
inserted
replaced
3040:cf9ebb038c1c | 3041:876730d84b73 |
---|---|
164 | 164 |
165 (princ (format "\n\ngrand total: %s\n" grandtotal))) | 165 (princ (format "\n\ngrand total: %s\n" grandtotal))) |
166 grandtotal)))) | 166 grandtotal)))) |
167 | 167 |
168 | 168 |
169 (defun show-lrecord-stats () | 169 (defun show-object-memory-usage-stats () |
170 "Show statistics about lrecord usage in XEmacs." | 170 "Show statistics about object memeory usage in XEmacs." |
171 (interactive) | 171 (interactive) |
172 (garbage-collect) | 172 (garbage-collect) |
173 (let ((buffer "*lrecord statistics*") | 173 (let ((buffer "*object memory usage statistics*") |
174 (plist (lrecord-stats)) | 174 (plist (object-memory-usage-stats)) |
175 (fmt "%-30s%10s%10s\n") | 175 (fmt "%-30s%10s%10s\n") |
176 (grandtotal 0) | 176 (grandtotal 0) |
177 begin) | 177 begin) |
178 (flet ((show-stats (match-string) | 178 (flet ((show-stats (match-string) |
179 (princ (format fmt "object" "count" "storage")) | 179 (princ (format fmt "object" "count" "storage")) |
231 (point)))))) | 231 (point)))))) |
232 (with-output-to-temp-buffer buffer | 232 (with-output-to-temp-buffer buffer |
233 (save-excursion | 233 (save-excursion |
234 (set-buffer buffer) | 234 (set-buffer buffer) |
235 (setq begin (point)) | 235 (setq begin (point)) |
236 (princ "Allocated with new allocator:\n") | 236 (princ "Allocated with lisp allocator:\n") |
237 (show-stats "\\(.*\\)-storage$") | 237 (show-stats "\\(.*\\)-storage$") |
238 (princ "\n\n") | 238 (princ "\n\n") |
239 (setq begin (point)) | 239 (setq begin (point)) |
240 (princ "Allocated additionally:\n") | 240 (princ "Allocated additionally:\n") |
241 (show-stats "\\(.*\\)-storage-additional$") | 241 (show-stats "\\(.*\\)-storage-additional$") |