;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:37:34 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/elp.el ;;; emacs version 19.28.90.26. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/elp.el' was compiled for Emacs 19")) #@31 *List of function to profile. (defvar elp-function-list nil (#$ . -475)) #@124 *Non-nil means reset all profiling info after results are displayed. Results are displayed with the `elp-results' command. (defvar elp-reset-after-results t (#$ . -555)) #@641 *Non-nil specifies elp results sorting function. These functions are currently available: elp-sort-by-call-count -- sort by the highest call count elp-sort-by-total-time -- sort by the highest total time elp-sort-by-average-time -- sort by the highest average times You can write you're own sort function. It should adhere to the interface specified by the PRED argument for the `sort' defun. Each "element of LIST" is really a 4 element vector where element 0 is the call count, element 1 is the total time spent in the function, element 2 is the average time spent in the function, and element 3 is the symbol's name string. (defvar elp-sort-by-function nil (#$ . -732)) #@230 *Prevents some functions from being displayed in the results buffer. If a number, no function that has been called fewer than that number of times will be displayed in the output buffer. If nil, all functions will be displayed. (defvar elp-report-limit nil (#$ . -1425)) #@21 ELP version number. (defconst elp-version "2.23" (#$ . 1703)) #@61 Address accepting submissions of bug reports and questions. (defconst elp-help-address "tools-help@anthem.nlm.nih.gov" (#$ . 1771)) #@47 Buffer name for outputting profiling results. (defvar elp-results-buffer "*ELP Profiling Results*" (#$ . 1909)) #@32 ELP information property name. (defconst elp-timer-info-property (quote elp-info) (#$ . 2027)) #@53 List of all functions currently being instrumented. (defvar elp-all-instrumented-list nil (#$ . 2128)) #@101 Controls whether functions should record times or not. This variable is set by the master function. (defvar elp-record-p t (#$ . 2238)) #@25 Master function symbol. (defvar elp-master nil (#$ . 2380)) #@81 Instrument FUNSYM for profiling. FUNSYM must be a symbol of a defined function. (defalias 'elp-instrument-function #[(funsym) "KÉ # =\"!%\"D!??EFC\"\f#M>TB+" [funsym funguts vector 0 infovec (lambda (&rest args)) newguts macro error "ELP cannot profile macro %s" commandp append ((interactive)) elp-wrapper quote and (interactive-p) args put elp-timer-info-property elp-all-instrumented-list] 8 (#$ . 2446) "aFunction to instrument: "]) #@115 Restore an instrumented function to its original definition. Argument FUNSYM is the symbol of a defined function. (defalias 'elp-restore-function #[(funsym) " N\f\" = #\n*K*\nHM)" [funsym elp-timer-info-property info delq elp-all-instrumented-list elp-master nil t elp-record-p put elp-wrapper 2] 4 (#$ . 2951) "aFunction to restore: "]) #@104 Instrument for profiling, all functions in `elp-function-list'. Use optional LIST if provided instead. (defalias 'elp-instrument-list #[(&optional list) " \")" [list elp-function-list mapcar elp-instrument-function] 3 (#$ . 3324) "PList of functions to instrument: "]) #@174 Instrument for profiling, all functions which start with PREFIX. For example, to instrument all ELP functions, do the following: \[elp-instrument-package] RET elp- RET (defalias 'elp-instrument-package #[(prefix) "\f #\"!" [elp-instrument-list mapcar intern all-completions prefix obarray #[(sym) " !\f K=?" [fboundp sym macro] 2]] 7 (#$ . 3609) "sPrefix of package to instrument: "]) #@115 Restore the original definitions for all functions in `elp-function-list'. Use optional LIST if provided instead. (defalias 'elp-restore-list #[(&optional list) " \")" [list elp-function-list mapcar elp-restore-function] 3 (#$ . 4018) "PList of functions to restore: "]) #@68 Restores the original definitions of all functions being profiled. (defalias 'elp-restore-all #[nil " !" [elp-restore-list elp-all-instrumented-list] 2 (#$ . 4304) nil]) #@45 Reset the profiling information for FUNSYM. (defalias 'elp-reset-function #[(funsym) " N \"\nʼnI\nI)" [funsym elp-timer-info-property info error "%s is not instrumented for profiling." 0 1 0.0] 4 (#$ . 4482) "aFunction to reset: "]) #@114 Reset the profiling information for all functions in `elp-function-list'. Use optional LIST if provided instead. (defalias 'elp-reset-list #[(&optional list) " \")" [list elp-function-list mapcar elp-reset-function] 3 (#$ . 4735) "PList of functions to reset: "]) #@67 Reset the profiling information for all functions being profiled. (defalias 'elp-reset-all #[nil " !" [elp-reset-list elp-all-instrumented-list] 2 (#$ . 5014) nil]) #@40 Set the master function for profiling. (defalias 'elp-set-master #[(funsym) "\f> !" [funsym elp-master nil elp-record-p elp-all-instrumented-list elp-instrument-function] 2 (#$ . 5187) "aMaster function: "]) #@29 Unsets the master function. (defalias 'elp-unset-master #[nil "‰" [nil elp-master t elp-record-p] 2 (#$ . 5411) nil]) (defalias 'elp-get-time #[nil "  A@! 8!ĥ\\)" [current-time now float 2 1000000.0] 4]) (put (quote elp-get-time) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@199 This function has been instrumented for profiling by the ELP. ELP is the Emacs Lisp Profiler. To restore the function to its original definition, use \[elp-restore-function] or \[elp-restore-all]. (defalias 'elp-wrapper #[(funsym interactive-p args) "\f =\f \fNH \" \" =\f2!8\" A@!8!ӥ\\) HTI\fg!m\" H A@!8!ӥ\\)Z\\I) = +" [elp-master funsym t elp-record-p elp-timer-info-property info 2 func nil result error "%s is not instrumented for profiling." interactive-p call-interactively apply args current-time now float 1000000.0 enter-time 0 1] 8 (#$ . 5719)]) (byte-code "! B! B!  B!- B‡" [boundp elp-field-len nil current-load-list elp-cc-len elp-at-len elp-et-len] 2) (defalias 'elp-sort-by-call-count #[(vec1 vec2) "H\nHY" [vec1 0 vec2] 3]) (defalias 'elp-sort-by-total-time #[(vec1 vec2) "H\nHY" [vec1 1 vec2] 3]) (defalias 'elp-sort-by-average-time #[(vec1 vec2) "H\nHY" [vec1 2 vec2] 3]) (defalias 'elp-pack-number #[(number width) "G X \"+ĔĕO ƕZƔ[ZZOƔƕOQ O" [number width string-match "^\\(.*\\)\\(e[+-].*\\)$" 1 0 2 3 "..."] 5]) (put (quote elp-pack-number) (quote byte-optimizer) (quote byte-compile-inline-expand)) (defalias 'elp-output-result #[(resultvec) "HHHH\n \f\n!\n\f! !\f::\nW?cG[\\\\\"\nc\nG[\\\\\" GXu\"ÔÕOŕZŔ[ZZOŔŕOQO*\fGX\"ÔÕOŕZŔ[ZZOŔŕOQO*cG[\\\\\"c*c." [resultvec 0 cc 1 tt 2 at 3 symname nil callcnt totaltime avetime number-to-string elp-report-limit insert-char 32 elp-field-len elp-cc-len elp-et-len width number string-match "^\\(.*\\)\\(e[+-].*\\)$" "..." elp-at-len atstr ttstr "\n"] 7]) #@182 Display current profiling results. If `elp-reset-after-results' is non-nil, then current profiling information for all instrumented functions are reset after results are displayed. (defalias 'elp-results #[nil "p !\nq  G\n  GGG\" c\nVQ\nZ\"  ܱ \"c\"c\"c\"c\"\". q\n!\" *" [get-buffer-create elp-results-buffer resultsbuf curbuf erase-buffer beginning-of-buffer 0 longest "Function Name" title titlelen elp-field-len "Call Count" cc-header elp-cc-len "Elapsed Time" et-header elp-et-len "Average Time" at-header elp-at-len mapcar #[(funsym) " N\"\nH\nH \n @ G]  U5͂> !! $," [funsym elp-timer-info-property info format "%s" symname 0 cc 1 tt "No profiling information found for: " longest vector 0.0 float] 6] elp-all-instrumented-list resvec insert-char 32 " " "\n" 61 elp-sort-by-function sort elp-output-result pop-to-buffer elp-reset-after-results elp-reset-all] 8 (#$ . 7602) nil]) #@39 Submit via mail, a bug report on elp. (defalias 'elp-submit-bug-report #[nil "!! P#" [y-or-n-p "Do you want to submit a report on elp? " require reporter reporter-submit-bug-report elp-help-address "elp " elp-version (elp-report-limit elp-reset-after-results elp-sort-by-function)] 4 (#$ . 8656) nil]) (provide (quote elp))