mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 19:00:55 -08:00
Include average sizes in igc-stats output
This commit is contained in:
parent
dd461b6fc9
commit
03dccff201
2 changed files with 16 additions and 11 deletions
|
|
@ -90,11 +90,12 @@
|
||||||
(keymap-local-set "x" #'igc-clear)
|
(keymap-local-set "x" #'igc-clear)
|
||||||
(display-line-numbers-mode -1)
|
(display-line-numbers-mode -1)
|
||||||
(setq header-line-format
|
(setq header-line-format
|
||||||
'((:eval (format " %-35s %10s %15s"
|
'((:eval (format " %-35s %10s %15s %10s"
|
||||||
(concat "Display "
|
(concat "Display "
|
||||||
(symbol-name igc--display-mode))
|
(symbol-name igc--display-mode))
|
||||||
"Objects"
|
"Objects"
|
||||||
"Bytes"))))
|
"Bytes"
|
||||||
|
"Avg"))))
|
||||||
(setq-local revert-buffer-function
|
(setq-local revert-buffer-function
|
||||||
(lambda (&rest _)
|
(lambda (&rest _)
|
||||||
(setq igc--display-mode 'diff)
|
(setq igc--display-mode 'diff)
|
||||||
|
|
@ -120,9 +121,13 @@ the changes to snapshot A. See the modes's help."
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(delete-all-overlays)
|
(delete-all-overlays)
|
||||||
(when info
|
(when info
|
||||||
(cl-loop for (title n bytes) in info
|
(cl-loop for (title n bytes) in info do
|
||||||
do (insert (format "%-35s %10s %15s\n" title n
|
(insert (format "%-35s %10s %15s %10s\n"
|
||||||
bytes)))
|
title n bytes
|
||||||
|
(and bytes n
|
||||||
|
(if (zerop n)
|
||||||
|
0
|
||||||
|
(abs (/ bytes n)))))))
|
||||||
(sort-lines nil (point-min) (point-max)))
|
(sort-lines nil (point-min) (point-max)))
|
||||||
(goto-char (point-min))))
|
(goto-char (point-min))))
|
||||||
(display-buffer "*igc*"))
|
(display-buffer "*igc*"))
|
||||||
|
|
|
||||||
12
src/igc.c
12
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));
|
make_int (st.pvec[i].nobjs), make_int (st.pvec[i].nbytes));
|
||||||
result = Fcons (e, result);
|
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))),
|
make_float (mps_arena_pause_time (gc->arena))),
|
||||||
result);
|
result);
|
||||||
result = Fcons (list2 (build_string ("reserved"),
|
result = Fcons (list3 (build_string ("reserved"), make_int (1),
|
||||||
make_int (mps_arena_reserved (gc->arena))),
|
make_int (mps_arena_reserved (gc->arena))),
|
||||||
result);
|
result);
|
||||||
result = Fcons (list2 (build_string ("spare"),
|
result = Fcons (list3 (build_string ("spare"), Qnil,
|
||||||
make_float (mps_arena_spare (gc->arena))),
|
make_float (mps_arena_spare (gc->arena))),
|
||||||
result);
|
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))),
|
make_int (mps_arena_spare_committed (gc->arena))),
|
||||||
result);
|
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))),
|
make_int (mps_arena_commit_limit (gc->arena))),
|
||||||
result);
|
result);
|
||||||
result = Fcons (list2 (build_string ("committed"),
|
result = Fcons (list3 (build_string ("committed"), make_int (1),
|
||||||
make_int (mps_arena_committed (gc->arena))),
|
make_int (mps_arena_committed (gc->arena))),
|
||||||
result);
|
result);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue