diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-30 08:29:06 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-30 08:29:06 +0100 |
commit | dc771b6c409c016dec6aea394d574de1cca3c583 (patch) | |
tree | e6bf30f33b0fd53d1832209185c1132de8d95014 /lisp | |
parent | 3c0c47b3a74c4ea851293d0869f956a4644af062 (diff) | |
download | emacs-dc771b6c409c016dec6aea394d574de1cca3c583.tar.gz |
Also count symbol plists in memory-report
* lisp/emacs-lisp/memory-report.el (memory-report--symbol-plist):
New function.
(memory-report): Use it.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/memory-report.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el index 332749987c4..1cb9ad15316 100644 --- a/lisp/emacs-lisp/memory-report.el +++ b/lisp/emacs-lisp/memory-report.el @@ -48,6 +48,7 @@ by counted more than once." (message "Gathering data...") (let ((reports (append (memory-report--garbage-collect) (memory-report--image-cache) + (memory-report--symbol-plist) (memory-report--buffers) (memory-report--largest-variables))) (inhibit-read-only t) @@ -159,6 +160,17 @@ by counted more than once." "\n")) (buffer-string))))) +(defun memory-report--symbol-plist () + (let ((counted (make-hash-table :test #'eq)) + (total 0)) + (mapatoms + (lambda (symbol) + (cl-incf total (memory-report--object-size + counted (symbol-plist symbol)))) + obarray) + (list + (cons "Memory Used By Symbol Plists" total)))) + (defun memory-report--object-size (counted value) (if (gethash value counted) 0 |