%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/emacs-lisp/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/emacs-lisp/elp.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; 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\310\311\312DD\313\314\315\304\301&\210\306\316\310\311\317DD\320\314\321\304\301&\210\306\322\310\311\323DD\324\314\311\304\301&\210\306\325\310\311\326DD\327\314\330\304\301&\210\306\331\310\311\332DD\333\314\321\304\301&\210\306\334\310\311\335DD\336\314\321\304\301&\207" [custom-declare-group elp nil "Emacs Lisp Profiler." :group lisp custom-declare-variable elp-function-list funcall function #[0 "\300\207" [nil] 1] "List of functions to profile.\nUsed by the command `elp-instrument-list'." :type (repeat function) elp-reset-after-results #[0 "\300\207" [t] 1] "Non-nil means reset all profiling info after results are displayed.\nResults are displayed with the `elp-results' command." boolean elp-sort-by-function #[0 "\300\207" [elp-sort-by-total-time] 1] "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." elp-report-limit #[0 "\300\207" [1] 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 #[0 "\300\207" [nil] 1] "If non-nil, output to `standard-output' instead of a buffer." elp-recycle-buffers-p #[0 "\300\207" [t] 1] "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*" (#$ . 2493))
#@32 ELP information property name.
(defconst elp-timer-info-property 'elp-info (#$ . 2611))
#@101 Controls whether functions should record times or not.
This variable is set by the master function.
(defvar elp-record-p t (#$ . 2706))
#@25 Master function symbol.
(defvar elp-master nil (#$ . 2848))
#@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 '(called-interactively-p error call-interactively apply current-time + byte-code-function-p functionp byte-code subrp indirect-function fboundp) (#$ . 2915))
#@12 

(fn FUN)
(defalias 'elp-profilable-p #[257 "\2119\205&\301!\205&\211>\206%\302!\206%\211K\211\242\303=\262\206%\304!?\207" [elp-not-profilable fboundp keymapp autoload special-form-p] 4 (#$ . 3265)])
(defconst elp--advice-name 'ELP-instrumentation\ )
#@94 Instrument FUNSYM for profiling.
FUNSYM must be a symbol of a defined function.

(fn FUNSYM)
(defalias 'elp-instrument-function #[257 "\302\303\211\"\304!\204\305\306\"\210\307#\210\310\311\312!\313	B\314B$\207" [elp-timer-info-property elp--advice-name vector 0 elp-profilable-p error "ELP cannot profile the function: %s" put advice-add :around elp--make-wrapper name ((depth . -99))] 8 (#$ . 3534) "aFunction to instrument: "])
#@12 

(fn SYM)
(defalias 'elp--instrumented-p #[257 "\301\"\207" [elp--advice-name advice-member-p] 4 (#$ . 3980)])
#@128 Restore an instrumented function to its original definition.
Argument FUNSYM is the symbol of a defined function.

(fn FUNSYM)
(defalias 'elp-restore-function #[257 "\211=\203\n\304\305\306\n\304#\210\307\"\207" [elp-master elp-record-p elp-timer-info-property elp--advice-name nil t put advice-remove] 5 (#$ . 4101) (byte-code "\301\302\303\304\305$!C\207" [obarray intern completing-read "Function to restore: " elp--instrumented-p t] 6)])
#@225 Instrument, for profiling, all functions in `elp-function-list'.
Use optional LIST if provided instead.
If called interactively, prompt for LIST in the minibuffer;
type "nil" to use `elp-function-list'.

(fn &optional LIST)
(defalias 'elp-instrument-list #[256 "\211<\204\f\301\302\303D\"\210\304\305\206\"\207" [elp-function-list signal wrong-type-argument listp mapcar elp-instrument-function] 5 (#$ . 4558) "xList of functions to instrument: "])
#@187 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

(fn PREFIX)
(defalias 'elp-instrument-package #[257 "\211G\301U\203\302\303!\210\304\305\306\307\310#\"!\207" [obarray 0 error "Instrumenting all Emacs functions would render Emacs unusable" elp-instrument-list mapcar intern all-completions elp-profilable-p] 8 (#$ . 5020) (byte-code "\301\302\303#C\207" [obarray completing-read "Prefix of package to instrument: " elp-profilable-p] 4)])
#@136 Restore the original definitions for all functions in `elp-function-list'.
Use optional LIST if provided instead.

(fn &optional LIST)
(defalias 'elp-restore-list #[256 "\301\302\206\"\207" [elp-function-list mapcar elp-restore-function] 4 (#$ . 5595) "PList of functions to restore: "])
#@67 Restore the original definitions of all functions being profiled.
(defalias 'elp-restore-all #[0 "\300\301!\207" [mapatoms elp-restore-function] 2 (#$ . 5893) nil])
#@58 Reset the profiling information for FUNSYM.

(fn FUNSYM)
(defalias 'elp-reset-function #[257 "\211N\211\204\f\301\302\"\210\211\303\211I\210\211\304\305I\207" [elp-timer-info-property error "%s is not instrumented for profiling" 0 1 0.0] 5 (#$ . 6064) "aFunction to reset: "])
#@135 Reset the profiling information for all functions in `elp-function-list'.
Use optional LIST if provided instead.

(fn &optional LIST)
(defalias 'elp-reset-list #[256 "\211\206\301\302\"\207" [elp-function-list mapcar elp-reset-function] 5 (#$ . 6351) "PList of functions to reset: "])
#@67 Reset the profiling information for all functions being profiled.
(defalias 'elp-reset-all #[0 "\300\301!\207" [mapatoms #[257 "\211N\205	\301!\207" [elp-timer-info-property elp-reset-function] 3 "\n\n(fn SYM)"]] 2 (#$ . 6646) nil])
#@53 Set the master function for profiling.

(fn FUNSYM)
(defalias 'elp-set-master #[257 "\211\302\303!\206
\304!\207" [elp-master elp-record-p nil elp--instrumented-p elp-instrument-function] 3 (#$ . 6888) (byte-code "\302\303\304\305\306\307\211	\205\310	!&!C\207" [obarray elp-master intern completing-read "Master function: " elp--instrumented-p t nil symbol-name] 10)])
#@28 Unset the master function.
(defalias 'elp-unset-master #[0 "\302\303\211\207" [elp-master elp-record-p nil t] 2 (#$ . 7273) nil])
#@18 

(fn START END)
(defalias 'elp-elapsed-time #[514 "\300\301\"!\207" [float-time time-subtract] 6 (#$ . 7411)])
(put 'elp-elapsed-time 'byte-optimizer 'byte-compile-inline-expand)
#@64 Make the piece of advice that instruments FUNSYM.

(fn FUNSYM)
(defalias 'elp--make-wrapper #[257 "\300\301\302\303\304!\305\"\306\307%\207" [make-byte-code 385 "	\203\f\300	=\203\f\304\300N\305\204\306\307\300\"\210\n\204&\310\"\262\202O\305\211\311\311HTI\266\312 \262\310\"\262\211\313\313H\305\314\315\"!\266\202\\I\266	\203[\300	=\203[\305\207" vconcat vector [elp-master elp-record-p elp-timer-info-property t nil error "%s is not instrumented for profiling" apply 0 current-time 1 float-time time-subtract] 15 "This function has been instrumented for profiling by the ELP.\nELP is the Emacs Lisp Profiler.  To restore the function to its\noriginal definition, use \\[elp-restore-function] or \\[elp-restore-all].\n\n(fn FUNC &rest ARGS)"] 7 (#$ . 7599)])
(defvar elp-field-len nil)
(defvar elp-cc-len nil)
(defvar elp-at-len nil)
(defvar elp-et-len nil)
#@18 

(fn VEC1 VEC2)
(defalias 'elp-sort-by-call-count #[514 "\300H\300HY\207" [0] 5 (#$ . 8495)])
#@18 

(fn VEC1 VEC2)
(defalias 'elp-sort-by-total-time #[514 "\300H\300HY\207" [1] 5 (#$ . 8598)])
#@18 

(fn VEC1 VEC2)
(defalias 'elp-sort-by-average-time #[514 "\300H\300HY\207" [2] 5 (#$ . 8701)])
#@21 

(fn NUMBER WIDTH)
(defalias 'elp-pack-number #[514 "GX\203	\207\300\301\"\203'\302\303\304\"\305\306\307\225\307\224[\310$#\311\303\307\"Q\207\302\305#\207" [string-match "^\\(.*\\)\\(e[+-].*\\)$" substring match-string 1 0 - 2 3 "..."] 10 (#$ . 8806)])
(put 'elp-pack-number 'byte-optimizer 'byte-compile-inline-expand)
#@18 

(fn RESULTVEC)
(defalias 'elp-output-result #[257 "\211\305H\306H\307H\310H\311\211\211\312!\262\312!\262\312!\262\205-\247\205-W?\205\324\313!\210\314\315\316	G[\307#\"\210c\210\314\315\316\nG[\307#\"\210GX\203_\266\202\202\210\317\320\"\203\201\321\322\306\"\305\323\307\225\307\224[\310$#\324\322\307\"Q\266\202\202\210\321\305#\266\202\fGX\203\227\266\202\202\300\317\320\"\203\271\321\322\306\"\305\323\307\225\307\224[\310$#\324\322\307\"Q\266\202\202\300\321\305#\266\202c\210\314\315\316G[\307#\"\210\211c\266\325c\207" [elp-report-limit elp-field-len elp-cc-len elp-et-len elp-at-len 0 1 2 3 nil number-to-string elp-output-insert-symname insert-char 32 + string-match "^\\(.*\\)\\(e[+-].*\\)$" substring match-string - "..." "\n"] 19 (#$ . 9146)])
#@42 Keymap used on the function name column.
(defvar elp-results-symname-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\303#\210\211\207" [make-sparse-keymap define-key [mouse-2] elp-results-jump-to-definition [follow-link] mouse-face "
"] 5) (#$ . 9970))
#@79 Jump to the definition of the function under the point.

(fn &optional EVENT)
(defalias 'elp-results-jump-to-definition #[256 "\211\203\n\300\301!!\210\302\303`\304\"!\207" [posn-set-point event-end find-function get-text-property elp-symname] 5 (#$ . 10248) (list last-nonmenu-event)])
#@16 

(fn SYMNAME)
(defalias 'elp-output-insert-symname #[257 "\301\302\303!\304\305\306\307\310\311\312&c\207" [elp-results-symname-map propertize elp-symname intern keymap mouse-face highlight face link help-echo "mouse-2 or RET jumps to definition"] 13 (#$ . 10543)])
#@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 #[0 "p\203\306	!\202\307	!\211q\210\310 \210\311C\312\211G\211\313\211G\314\211G\315\211G\316C\317\320\321\322\323\324\f\"\325\"\326\327%!\210\242])\204K*\203\216c\210\242V\203`\330\331\242Z\"\210\332\332\332\333\261\210\330\334\n\"\210\332c\210\330\334\"\210\332c\210\330\334\f\"\210\332c\210\330\334
\"\210\333c\210\202\254\311C\335\320\321\336\323\324!\337\"\340\341%F\342#+\210,\203\272\211\343\242,\"\240\210\344\345\242\"\210,\266q\210\346!\210)\204\324*\203\335\347ed{!\210\202\340eb\210-\205\347\350 \207" [elp-recycle-buffers-p elp-results-buffer elp-field-len elp-cc-len elp-et-len elp-at-len get-buffer-create generate-new-buffer erase-buffer 0 "Function Name" "Call Count" "Elapsed Time" "Average Time" nil mapatoms make-byte-code 257 "\303!\205E\211\nN\304\305\"\306H\307H\204\310\261\202C\300\211\242G]\240\210\301\311\306U\2034\312\202<\313!\313!\245$\301\242B\240\266\204\207" vconcat vector [elp-timer-info-property elp--instrumented-p format "%s" 0 1 "No profiling information found for: " vector 0.0 float] 12 "\n\n(fn FUNSYM)" insert-char 32 "  " "\n" 61 mapconcat "\302\303\304\305\306\300\242E\307\310%P\300\311\300\242\312\300\242\313U\203	\202G#\240\210\207" [elp-field-len propertize " " display space :align-to face fixed-pitch + 2 0] 8 "\n\n(fn TITLE)" "" sort mapc elp-output-result pop-to-buffer princ elp-reset-all elp-use-standard-output noninteractive header-line-format elp-sort-by-function elp-reset-after-results] 17 (#$ . 10821) nil])
#@33 Unload the Emacs Lisp Profiler.
(defalias 'elp-unload-function #[0 "\300 \210\301\207" [elp-restore-all nil] 1 (#$ . 12591)])
(byte-code "\300\301\302\303\304\305%\210\306\307!\207" [cl-generic-define-method loadhist-unload-element (:before :extra "elp") ((x (head defun))) nil #[257 "\300A!\207" [elp-restore-function] 3 "Un-instrument before unloading a function.\n\n(fn X)"] provide elp] 6)

Zerion Mini Shell 1.0