;; The profiler works by catching "ticks" (actually SIGPROF signals),
;; and looking at the current Lisp function, at the time of each tick.
-;; The output of this process is an alist with keys being the
-;; functions, and values being the number of ticks per function. From
-;; this, `profiling-results' easily extracts the total number of
+;; The output of this process is a hash table with keys being the
+;; functions, and values being the number of ticks per function.
+;; `profile-results' pretty-prints this information.
;; Unless stated otherwise, profiling info is being accumulated
;; incrementally through several profile runs (the current info is
;; always available by `get-profiling-info'). Use
;; function+descendants time;
;; 2) Each tick is equivalent to 1ms (which can be changed), but this
;; is CPU time (user+kernel), not the real time;
-;; 3) Only the actual
l funcalls are profiled. If a subr Ffoo calls
+;; 3) Only the actual funcalls are profiled. If a subr Ffoo calls
;; Fbar using Fbar (), only Ffoo will appear in the profile.
;; A typical profiling session consists of using `clear-profiling-info'
;; followed by `profile' or `profile-key-sequence', followed by
;; For instance, to see where Gnus spends time when generating Summary
;; buffer, go to the group buffer, and press `M-x clear-profiling-info'
(setq table call-count-profile-table))
- ;; Convert the hashtable to a list
+ ;; Convert the hashtable to a list
(maphash (lambda (key value)
(push (cons key value) list))
PROFILE was called, it will be turned off after FORMS are evaluated.
Otherwise, profiling will be left running.
-Returns the profiling info, printable by `profil
+Returns the profiling info, printable by `profil-results'."
`(let ((was-profiling (profiling-active-p)))