MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.147.48.161
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/emacs-lisp/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/emacs-lisp/elp.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:03 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/elp.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301\302\303\304\305%\210\306\307\302\310\311\312\304\301&\210\306\313\314\315\311\316\304\301&\210\306\317\320\321\311\322\304\301&\210\306\323\324\325\311\326\304\301&\210\306\327\302\330\311\316\304\301&\210\306\331\314\332\311\316\304\301&\207" [custom-declare-group elp nil "Emacs Lisp Profiler." :group lisp custom-declare-variable elp-function-list "List of functions to profile.\nUsed by the command `elp-instrument-list'." :type (repeat function) elp-reset-after-results t "Non-nil means reset all profiling info after results are displayed.\nResults are displayed with the `elp-results' command." boolean elp-sort-by-function 'elp-sort-by-total-time "Non-nil specifies ELP results sorting function.\nThese functions are currently available:\n\n  elp-sort-by-call-count   -- sort by the highest call count\n  elp-sort-by-total-time   -- sort by the highest total time\n  elp-sort-by-average-time -- sort by the highest average times\n\nYou can write your own sort function.  It should adhere to the\ninterface specified by the PREDICATE argument for `sort'.\nEach \"element of LIST\" is really a 4 element vector where element 0 is\nthe call count, element 1 is the total time spent in the function,\nelement 2 is the average time spent in the function, and element 3 is\nthe symbol's name string." function elp-report-limit 1 "Prevent some functions from being displayed in the results buffer.\nIf a number, no function that has been called fewer than that number\nof times will be displayed in the output buffer.  If nil, all\nfunctions will be displayed." (choice integer (const :tag "Show All" nil)) elp-use-standard-output "If non-nil, output to `standard-output' instead of a buffer." elp-recycle-buffers-p "If nil, don't recycle the `elp-results-buffer'.\nIn other words, a new unique buffer is create every time you run\n\\[elp-results]."] 8)
#@47 Buffer name for outputting profiling results.
(defvar elp-results-buffer "*ELP Profiling Results*" (#$ . 2439))
#@32 ELP information property name.
(defconst elp-timer-info-property 'elp-info (#$ . 2557))
#@53 List of all functions currently being instrumented.
(defvar elp-all-instrumented-list nil (#$ . 2651))
#@101 Controls whether functions should record times or not.
This variable is set by the master function.
(defvar elp-record-p t (#$ . 2761))
#@25 Master function symbol.
(defvar elp-master nil (#$ . 2903))
#@160 List of functions that cannot be profiled.
Those functions are used internally by the profiling code and profiling
them would thus lead to infinite recursion.
(defvar elp-not-profilable '(elp-wrapper called-interactively-p error call-interactively apply current-time + byte-code-function-p functionp byte-code subrp indirect-function fboundp) (#$ . 2970))
(defalias 'elp-profilable-p #[(fun) "9\205$\302!\205$	>\206#\303!\206#K\242\304>\206#\305\306\307\217?\207" [fun elp-not-profilable fboundp keymapp (autoload macro) nil (byte-code "\301\302!!\205\303\302!!A\304=\207" [fun subrp indirect-function subr-arity unevalled] 3) ((error))] 3])
#@81 Instrument FUNSYM for profiling.
FUNSYM must be a symbol of a defined function.
(defalias 'elp-instrument-function #[(funsym) "\306!\210K\307\310\211	#\311	\242\312=\203\313\314\"\210	\211\242)\315=\203*\313\316\"\210\317!\2045\313\320\"\210\321!\203@\322\323\"\322\324\325D\321!\205M\326\327BBBC\"\330
\n#\210\331N\211\203w\330\331\332#\210M\210\330\331#\210\202{M\210)>?\205\213B\211+\207" [funsym funguts infovec newguts object elp-timer-info-property elp-restore-function vector 0 (lambda (&rest args)) macro error "ELP cannot profile macro: %s" autoload "ELP cannot profile autoloaded function: %s" elp-profilable-p "ELP cannot profile the function: %s" commandp append ((interactive)) elp-wrapper quote (called-interactively-p 'any) (args) put ad-advice-info nil advice-info elp-all-instrumented-list] 7 (#$ . 3632) "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\306\"\f=\203\307\310\311	\307#\210\n\2057\312!\2057\313K!?\2057\314K\236\2057\n\315HM)\207" [funsym elp-timer-info-property info elp-all-instrumented-list elp-master elp-record-p delq nil t put functionp byte-code-function-p elp-wrapper 2] 4 (#$ . 4537) "aFunction to restore: "])
#@162 Instrument, for profiling, all functions in `elp-function-list'.
Use optional LIST if provided instead.
If called interactively, read LIST using the minibuffer.
(defalias 'elp-instrument-list #[(&optional list) "<\204\f\302\303\304D\"\210\206	\305\306\")\207" [list elp-function-list signal wrong-type-argument listp mapcar elp-instrument-function] 4 (#$ . 5005) "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) "\302G!\203\303\304!\210\305\306\307\310	\311#\"!\207" [prefix obarray zerop error "Instrumenting all Emacs functions would render Emacs unusable" elp-instrument-list mapcar intern all-completions elp-profilable-p] 7 (#$ . 5422) (list (completing-read "Prefix of package to instrument: " obarray 'elp-profilable-p))])
#@115 Restore the original definitions for all functions in `elp-function-list'.
Use optional LIST if provided instead.
(defalias 'elp-restore-list #[(&optional list) "\206	\302\303\")\207" [list elp-function-list mapcar elp-restore-function] 3 (#$ . 5969) "PList of functions to restore: "])
#@67 Restore the original definitions of all functions being profiled.
(defalias 'elp-restore-all #[nil "\301!\207" [elp-all-instrumented-list elp-restore-list] 2 (#$ . 6267) nil])
#@45 Reset the profiling information for FUNSYM.
(defalias 'elp-reset-function #[(funsym) "	N\211\204
\303\304\"\210\n\305\211I\210\n\306\307I)\207" [funsym elp-timer-info-property info error "%s is not instrumented for profiling" 0 1 0.0] 4 (#$ . 6450) "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) "\206	\302\303\")\207" [list elp-function-list mapcar elp-reset-function] 3 (#$ . 6735) "PList of functions to reset: "])
#@67 Reset the profiling information for all functions being profiled.
(defalias 'elp-reset-all #[nil "\301!\207" [elp-all-instrumented-list elp-reset-list] 2 (#$ . 7026) nil])
#@40 Set the master function for profiling.
(defalias 'elp-set-master #[(funsym) "\304>\206
\305!\207" [funsym elp-master elp-record-p elp-all-instrumented-list nil elp-instrument-function] 2 (#$ . 7205) "aMaster function: "])
#@28 Unset the master function.
(defalias 'elp-unset-master #[nil "\302\303\211\207" [elp-master elp-record-p nil t] 2 (#$ . 7440) nil])
(defalias 'elp-elapsed-time #[(start end) "\302\303	\"!\207" [end start float-time time-subtract] 4])
(put 'elp-elapsed-time 'byte-optimizer '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) "\203\f	=\203\f\306	N\211\307H\310
\204 \311\312	\"\210\n\2049\203/\313
!\2024\314
\"\202\205\310\211\f\315\f\315HTI\210\203\\\316 \313
!\316 \202k\316 \314
\"\316 \f\317\f\317H\320\321\"!*\\I\210*\203\221	=\203\221\310+\207" [elp-master funsym elp-record-p elp-timer-info-property info func t 2 nil error "%s is not instrumented for profiling" call-interactively apply 0 current-time 1 float-time time-subtract result interactive-p args exit-time enter-time end start] 8 (#$ . 7752)])
(defvar elp-field-len nil)
(defvar elp-cc-len nil)
(defvar elp-at-len nil)
(defvar elp-et-len nil)
(defalias 'elp-sort-by-call-count #[(vec1 vec2) "\302H	\302HY\207" [vec1 vec2 0] 3])
(defalias 'elp-sort-by-total-time #[(vec1 vec2) "\302H	\302HY\207" [vec1 vec2 1] 3])
(defalias 'elp-sort-by-average-time #[(vec1 vec2) "\302H	\302HY\207" [vec1 vec2 2] 3])
(defalias 'elp-pack-number #[(number width) "G	X\203	\207\302\303\"\203&\304\305\"\306\307	\310\225\310\224[\311$O\312\304\310\"Q\207\306	O\207" [number width string-match "^\\(.*\\)\\(e[+-].*\\)$" match-string 1 0 - 2 3 "..."] 7])
(put 'elp-pack-number 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'elp-output-result #[(resultvec) "\306H\307H\310H\311H\312\211\312\313	!\313\n!\313!\2055\247\2055	W?\205\361\314\f!\210\315\316\317\fG[\310#\"\210
c\210\315\316\317
G[\310#\"\210\211GX\203m\202\226\320\321\"\203\220\322\307\"\306\323\310\225\310\224[\311$O\324\322\310\"Q\202\226\306O*\211GX\203\254\202\325\320\321\"\203\317\322\307\"\306\323\310\225\310\224[\311$O\324\322\310\"Q\202\325\306O*\211 c\210\315\316\317 G[\310#\"\210c\210*\325c.\207" [resultvec cc tt at symname callcnt 0 1 2 3 nil number-to-string elp-output-insert-symname insert-char 32 + string-match "^\\(.*\\)\\(e[+-].*\\)$" match-string - "..." "\n" totaltime avetime elp-report-limit elp-field-len elp-cc-len elp-et-len width number elp-at-len atstr ttstr] 9])
#@42 Keymap used on the function name column.
(defvar elp-results-symname-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\304#\210)\207" [map make-sparse-keymap define-key [mouse-2] elp-results-jump-to-definition [follow-link] mouse-face "
"] 4) (#$ . 10065))
#@57 Jump to the definition of the function under the point.
(defalias 'elp-results-jump-to-definition #[(&optional event) "\203\n\301\302!!\210\303\304`\305\"!\207" [event posn-set-point event-end find-function get-text-property elp-symname] 4 (#$ . 10347) (list last-nonmenu-event)])
(defalias 'elp-output-insert-symname #[(symname) "\302\303\304!\305	\306\307\310\311\312\313&c\207" [symname elp-results-symname-map propertize elp-symname intern keymap mouse-face highlight face link help-echo "mouse-2 or RET jumps to definition"] 12])
#@181 Display current profiling results.
If `elp-reset-after-results' is non-nil, then current profiling
information for all instrumented functions is reset after results are
displayed.
(defalias 'elp-results #[nil "p\203\306	!\202\307	!\nq\210\310 \210\311\312\211G\211\313\211 G!\314\211\"G#\315\211$G%\316\317&\"'\f](\204M)\203\223
c\210\fV\203_\320\321\fZ\"\210\322 \322\"\322$\323\261\210\320\324\"\210\322c\210\320\324!\"\210\322c\210\320\324#\"\210\322c\210\320\324%\"\210\323c\210\202\245\311*\325\326
 \"$F\327#+),\203\262\330',\"'\331\332'\"\210.q\210\333\n!\210(\204\313)\203\324\334ed{!\210\202\327eb\210-\205\336\335 *\207" [elp-recycle-buffers-p elp-results-buffer resultsbuf curbuf longest title get-buffer-create generate-new-buffer erase-buffer 0 "Function Name" "Call Count" "Elapsed Time" "Average Time" mapcar #[(funsym) "	N\306\307\"\n\310H\n\311H\n\204\312\261\2029G]\313\f
\314\f!\2030\315\2027\316
!\316\f!\245$,\207" [funsym elp-timer-info-property info symname cc tt format "%s" 0 1 "No profiling information found for: " vector zerop 0.0 float longest] 6] insert-char 32 "  " "\n" 61 mapconcat #[(title) "\303\304\305\306\307E\310\311%	P\312\313\314U\203\n\202	G#\207" [column title elp-field-len propertize " " display space :align-to face fixed-pitch + 2 0] 6] "" sort mapc elp-output-result pop-to-buffer princ elp-reset-all titlelen elp-field-len cc-header elp-cc-len et-header elp-et-len at-header elp-at-len elp-all-instrumented-list resvec elp-use-standard-output noninteractive column header-line-format elp-sort-by-function elp-reset-after-results] 8 (#$ . 10895) nil])
#@33 Unload the Emacs Lisp Profiler.
(defalias 'elp-unload-function #[nil "\300 \210\301\207" [elp-restore-all nil] 1 (#$ . 12592)])
(provide 'elp)

MMCT - 2023