[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/igc 03dccff2017: Include average sizes in igc-stats output
From: |
Gerd Moellmann |
Subject: |
scratch/igc 03dccff2017: Include average sizes in igc-stats output |
Date: |
Mon, 1 Jul 2024 03:06:55 -0400 (EDT) |
branch: scratch/igc
commit 03dccff2017facfecdf068bf468b09b604b93fd6
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Include average sizes in igc-stats output
---
lisp/emacs-lisp/igc.el | 15 ++++++++++-----
src/igc.c | 12 ++++++------
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/lisp/emacs-lisp/igc.el b/lisp/emacs-lisp/igc.el
index 93f3db6de86..9f4b2c2cd9d 100644
--- a/lisp/emacs-lisp/igc.el
+++ b/lisp/emacs-lisp/igc.el
@@ -90,11 +90,12 @@
(keymap-local-set "x" #'igc-clear)
(display-line-numbers-mode -1)
(setq header-line-format
- '((:eval (format " %-35s %10s %15s"
+ '((:eval (format " %-35s %10s %15s %10s"
(concat "Display "
(symbol-name igc--display-mode))
"Objects"
- "Bytes"))))
+ "Bytes"
+ "Avg"))))
(setq-local revert-buffer-function
(lambda (&rest _)
(setq igc--display-mode 'diff)
@@ -120,9 +121,13 @@ the changes to snapshot A. See the modes's help."
(erase-buffer)
(delete-all-overlays)
(when info
- (cl-loop for (title n bytes) in info
- do (insert (format "%-35s %10s %15s\n" title n
- bytes)))
+ (cl-loop for (title n bytes) in info do
+ (insert (format "%-35s %10s %15s %10s\n"
+ title n bytes
+ (and bytes n
+ (if (zerop n)
+ 0
+ (abs (/ bytes n)))))))
(sort-lines nil (point-min) (point-max)))
(goto-char (point-min))))
(display-buffer "*igc*"))
diff --git a/src/igc.c b/src/igc.c
index 67fba40c9b7..3790a8e0ea6 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -3813,22 +3813,22 @@ DEFUN ("igc-info", Figc_info, Sigc_info, 0, 0, 0, doc :
/* */)
make_int (st.pvec[i].nobjs), make_int (st.pvec[i].nbytes));
result = Fcons (e, result);
}
- result = Fcons (list2 (build_string ("pause-time"),
+ result = Fcons (list3 (build_string ("pause-time"), Qnil,
make_float (mps_arena_pause_time (gc->arena))),
result);
- result = Fcons (list2 (build_string ("reserved"),
+ result = Fcons (list3 (build_string ("reserved"), make_int (1),
make_int (mps_arena_reserved (gc->arena))),
result);
- result = Fcons (list2 (build_string ("spare"),
+ result = Fcons (list3 (build_string ("spare"), Qnil,
make_float (mps_arena_spare (gc->arena))),
result);
- result = Fcons (list2 (build_string ("spare-committed"),
+ result = Fcons (list3 (build_string ("spare-committed"), make_int (1),
make_int (mps_arena_spare_committed (gc->arena))),
result);
- result = Fcons (list2 (build_string ("commit-limit"),
+ result = Fcons (list3 (build_string ("commit-limit"), make_int (1),
make_int (mps_arena_commit_limit (gc->arena))),
result);
- result = Fcons (list2 (build_string ("committed"),
+ result = Fcons (list3 (build_string ("committed"), make_int (1),
make_int (mps_arena_committed (gc->arena))),
result);
return result;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/igc 03dccff2017: Include average sizes in igc-stats output,
Gerd Moellmann <=