;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 3 21:52:47 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/profile.el ;;; emacs version 19.22.92.2. ;;; 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")) (defvar profile-functions-list nil "\ *List of functions to profile.") (defvar profile-timer-program (concat exec-directory "profile") "\ *Name of the profile timer program.") (defvar profile-timer-process nil "\ Process running the timer.") (defvar profile-time-list nil "\ List of accumulative time for each profiled function.") (defvar profile-init-list nil "\ List of entry time for each function. Both how many times invoked and real time of start.") (defvar profile-max-fun-name 0 "\ Max length of name of any function profiled.") (defvar profile-temp-result- nil "\ Should NOT be used anywhere else.") (defvar profile-time (byte-code "À‰B‡" [0] 2) "\ Used to return result from a filter.") (defvar profile-buffer "*profile*" "\ Name of profile buffer.") (defalias 'profile-functions #[(&optional flist) "„ ÂÃ\"‡" [flist profile-functions-list mapcar profile-a-function] 3 "\ Profile all the functions listed in `profile-functions-list'. With argument FLIST, use the list FLIST instead." "*P"]) (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 "\ Filter for the timer process. Sets `profile-time' to the returned time."]) (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 "\ Print one ENTRY (from `profile-time-list')."]) (byte-code "À‡" [" " spaces nil] 1) (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 "\ Display profiling results in the buffer `*profile*'. (The buffer name comes from `profile-buffer'.)" nil]) (defalias (quote profile-reset-timer) #[nil "À Â\"‡" [process-send-string profile-timer-process "z\n"] 3]) (defalias 'profile-check-zero-init-times #[(entry) "AA‰@ÂU… AÂU?…ÃÄ!)‡" [entry time 0 error "Process timer died while making performance profile."] 3 "\ If ENTRY has non zero time, give an error."]) (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 "\ Get time from timer process into `profile-time'."]) (defalias 'profile-find-function #[(fun flist) "??… @@=ƒ@A‡Â A\"‡" [flist fun profile-find-function] 3 "\ Linear search for FUN in FLIST."]) (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 "\ On entry, keep current time for function FUN."]) (byte-code "ÀÀ‡" [1000000 profile-million] 1) (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 "\ When the call to the function FUN is finished, add its run time."]) (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 "\ Profile the function FUN." "aFunction to profile: "]) (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 "\ Take function FUN and return it fixed for profiling. DEF is (symbol-function FUN)."]) (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 "\ Restore profiled function FUN to its original state."]) (defalias 'profile-finish #[nil "ÀÁ\n\"ˆÃÅʼn‡" [mapcar profile-restore-fun profile-time-list 0 profile-max-fun-name nil profile-init-list] 3 "\ Stop profiling functions. Clear all the settings." nil]) (defalias 'profile-quit #[nil "À Â\"‡" [process-send-string profile-timer-process "q\n"] 3 "\ Kill the timer process." nil])