;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:48:27 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/profile.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/profile.el' was compiled for Emacs 19")) #@32 *List of functions to profile. (defvar profile-functions-list nil (#$ . -483)) #@37 *Name of the profile timer program. (defvar profile-timer-program (concat exec-directory "profile") (#$ . -568)) #@28 Process running the timer. (defvar profile-timer-process nil (#$ . 687)) #@55 List of accumulative time for each profiled function. (defvar profile-time-list nil (#$ . 766)) #@92 List of entry time for each function. Both how many times invoked and real time of start. (defvar profile-init-list nil (#$ . 868)) #@46 Max length of name of any function profiled. (defvar profile-max-fun-name 0 (#$ . 1007)) #@35 Should NOT be used anywhere else. (defvar profile-temp-result- nil (#$ . 1102)) #@38 Used to return result from a filter. (defvar profile-time (byte-code "À‰B‡" [0] 2) (#$ . 1188)) #@25 Name of profile buffer. (defvar profile-buffer "*profile*" (#$ . 1290)) #@112 Profile all the functions listed in `profile-functions-list'. With argument FLIST, use the list FLIST instead. (defalias 'profile-functions #[(&optional flist) "„ ÂÃ\"‡" [flist profile-functions-list mapcar profile-a-function] 3 (#$ . 1369) "*P"]) #@74 Filter for the timer process. Sets `profile-time' to the returned time. (defalias 'profile-filter #[(process input) "ÀÁ\n\"ÃUƒÄÅ\"‡È\nÉ”O! ˆÈ\nÕÉO!¡‡" [string-match "\\." input 0 error "Bad output from %s" profile-timer-program profile-time string-to-int nil] 5 (#$ . 1628)]) #@45 Print one ENTRY (from `profile-time-list'). (defalias 'profile-print #[(entry) "AÁÂÆÇ@\"±ˆÉ\n!ˆË @!‰cˆ\fG Y„8É\n!ˆ\fÍ \fGZOcˆ\fGuˆË A!ÎÏÍÐ\fGZO\fѱ+‡" [entry nil 5 offset str time format "%s" space move-to-column ref-column int-to-string spaces 0 "." "000000" 6 "\n"] 6 (#$ . 1921)]) (byte-code "ÀÁ\nBÁ‡" [" " spaces current-load-list] 2) #@101 Display profiling results in the buffer `*profile*'. (The buffer name comes from `profile-buffer'.) (defalias 'profile-results #[nil "Á\\ Ä\nOÆ!ˆÈ ˆÉ ±ˆÊ\n!ˆËÌ ±ˆÊ\n!ˆÍcˆÎÏ\"*‡" [profile-max-fun-name 8 ref-column spaces 0 space switch-to-buffer profile-buffer erase-buffer "Function" move-to-column "Time (Seconds.Useconds)\n" "========" "=======================\n" mapcar profile-print profile-time-list] 3 (#$ . 2340) nil]) (defalias 'profile-reset-timer #[nil "À Â\"‡" [process-send-string profile-timer-process "z\n"] 3]) #@44 If ENTRY has non zero time, give an error. (defalias 'profile-check-zero-init-times #[(entry) "AA‰@ÂU… AÂU?…ÃÄ!)‡" [entry time 0 error "Process timer died while making performance profile."] 3 (#$ . 2881)]) #@50 Get time from timer process into `profile-time'. (defalias 'profile-get-time #[nil "À !ƒ !Ã=„*ÄÅÆ!#É Ê\"ˆË !ˆÌ ˆÍÎ\"ˆÐ Ñ\"ˆÒ ‡" [processp profile-timer-process process-status run start-process "timer" get-buffer-create profile-buffer profile-timer-program set-process-filter profile-filter process-kill-without-query profile-reset-timer mapcar profile-check-zero-init-times profile-init-list process-send-string "p\n" accept-process-output] 4 (#$ . 3100)]) #@33 Linear search for FUN in FLIST. (defalias 'profile-find-function #[(fun flist) "??… @@=ƒ@A‡Â A\"‡" [flist fun profile-find-function] 3 (#$ . 3574)]) #@47 On entry, keep current time for function FUN. (defalias 'profile-start-function #[(fun) "À \n\"‰„ÄÅ \"ˆ @ÆU„ ‰@T ‚/ Ç ˆ A‰@ ˆ A¡)‡" [profile-find-function fun profile-init-list init-time error "Function %s missing from list" 0 1 profile-time] 4 (#$ . 3737)]) (byte-code "ÀÁ\nBÀ‡" [1000000 profile-million current-load-list] 2) #@66 When the call to the function FUN is finished, add its run time. (defalias 'profile-update-function #[(fun) "À \n\"À \"ĉ‰ƒ„ÉÊ \"ˆ‰@S ˆ@ËU??…ŒA\f@@Z\fAAZË ˆË¡ˆ ËY„`  \\S@\\ ˆ A\\¡ˆA W?…Œ‰@T ˆ‰A Z¡,‡" [profile-find-function fun profile-init-list profile-time-list nil usec sec accum init-time error "Function %s missing from list" 0 profile-time profile-million] 5 (#$ . 4083)]) #@27 Profile the function FUN. (defalias 'profile-a-function #[(fun) "KÁ!G‰@Ä=„ÅÆ\"ˆljBBBlj‰BBB B \n\nWƒ4\n\nË \"M*‡" [fun symbol-name funlen def lambda error "To profile: %s must be a user-defined function" 0 profile-time-list profile-init-list profile-max-fun-name profile-fix-fun] 5 (#$ . 4529) "aFunction to profile: "]) #@84 Take function FUN and return it fixed for profiling. DEF is (symbol-function FUN). (defalias 'profile-fix-fun #[(fun def) "À‰‰‰ÁÀ‰ GÊW?…  @ A@ AA@D ;…< GÊW?…  ;„J ‚YÊ C¤Ê ›@ <ƒo @Ë=ƒo C¤\fT\f ›‰@Ìš?… ÍC¤ÎÏDDC¤ÑÒÓC\n¤EC¤ÔC¤ÕÏDDC¤ÒC¤.‡" [nil 2 suffix inter count third second first prefix def 3 interactive (profile-get-time) (profile-get-time) profile-start-function quote fun setq profile-temp-result- progn (profile-get-time) profile-update-function] 8 (#$ . 4875)]) #@54 Restore profiled function FUN to its original state. (defalias 'profile-restore-fun #[(fun) "@KÁ‰‰A‰A@;ƒ\nA\nA@<ƒ(\nA@@Å=ƒ(\nAÆ\n›@‰<…A A@Ç=…A\n AA@A¡+‡" [fun nil index body def interactive 3 profile-temp-result-] 4 (#$ . 5405)]) #@52 Stop profiling functions. Clear all the settings. (defalias 'profile-finish #[nil "ÀÁ\n\"ˆÃÅʼn‡" [mapcar profile-restore-fun profile-time-list 0 profile-max-fun-name nil profile-init-list] 3 (#$ . 5655) nil]) #@25 Kill the timer process. (defalias 'profile-quit #[nil "À Â\"‡" [process-send-string profile-timer-process "q\n"] 3 (#$ . 5875) nil])