[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 30 Jun 2010 21:19:34 -0400
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Kevin Rodgers <address@hidden> writes:
> elp-instrument-package allows you to profile all the functions whose name
> with a PACKAGE- prefix. But what if you want to profile all the functions in
> a library, regardless of their name -- for example, the files.el library that
> distributed with Emacs and dumped in the executable.
FWIW, IMHO this is a good idea. Please also add a menu binding in
emacs-lisp-mode when this gets installed. [What is it waiting for?]
It would also be nice to have a similar function for trace.el
> (defun elp-instrument-file (file)
> "Instrument for profiling, all functions defined in FILE.
> FILE is a regexp matching a key in the `load-history' alist."
> (list (concat "\\`"
> (regexp-quote (completing-read "File to instrument: "
> nil t))
> (dolist (entry (cdr (load-history-filename-element file)))
> (when (and (consp entry)
> (eq (car entry) 'defun)
> (elp-profilable-p (cdr entry)))
> (elp-instrument-function (cdr entry)))))
> Kevin Rodgers
> Denver, Colorado, USA