Current File : //proc/self/root/kunden/proc/self/root/usr/share/emacs/27.2/lisp/profiler.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!\210\302\303\304\305\306\307\310\311\312\313& \207" [require cl-lib custom-declare-group profiler nil "Emacs profiler." :group lisp :version "24.3" :prefix "profiler-"] 10)
(defconst profiler-version "24.3")
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable profiler-sampling-interval funcall function #[0 "\300\207" [1000000] 1] "Default sampling interval in nanoseconds." :type integer :group profiler] 8)
#@15
(fn OBJECT)
(defalias 'profiler-ensure-string #[257 "\211;\203 \207\2119\203 \300!\207\211\247\203 \301!\207\302\303\"\207" [symbol-name number-to-string format "%s"] 4 (#$ . 874)])
#@23
(fn NUMBER DIVISOR)
(defalias 'profiler-format-percent #[514 "\300\301\302\303_\"\"\207" [format "%d%%" floor 100.0] 7 (#$ . 1070)])
#@54 Format NUMBER in human readable string.
(fn NUMBER)
(defalias 'profiler-format-number #[257 "\211\250\203V \211\300V\203V \301\302\303\"!T\304\246\305\306!\307\"\307\211:\203E @\262\300U\2034 \211\310C\244\262\304\262\211C\244\262S\262A\262\202 \311\312@\310=\203S A\202T \"\207\313!\207" [0 floor log 10 3 append number-to-string nil 44 apply string profiler-ensure-string] 9 (#$ . 1213)])
#@23
(fn FMT &rest ARGS)
(defalias 'profiler-format #[385 "\300\211\211\211\300\211\211\211 :\203\304 @\262\211A\262\242\262 \211A\262\242\262@\262:\203\304 @\262:\203B \301\302#\202g ;\203P \303\"\202g 9\203d \304!\203d !\202g \305!\262G\262W\203\213 \211\306\307\310Z]\311\312%\210C\244\262\202\270 \211\313\307Z]\314\" \315\267\202\250 P\202\262 \211P\202\262 \316\317\320#\205\262 \300\262C\244\262 A\262\nA\262\202\n \301\321\"\207" [nil apply profiler-format format fboundp profiler-ensure-string put-text-property 0 2 invisible profiler make-string 32 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (left 156 right 162)) error "cl-ecase failed: %s, %s" (left right) concat] 19 (#$ . 1630)])
#@106 Format ENTRY in human readable string. ENTRY would be a
function name of a function itself.
(fn ENTRY)
(defalias 'profiler-format-entry #[257 "\211\242\300>\203 \301\302\303!\"\207\304!\203 \301\305\303!\"\207\306!\204+ \2119\204+ \211;\2030 \301\307\"\207\301\310\303!\"\207" [(closure lambda) format "#<lambda %#x>" sxhash byte-code-function-p "#<compiled %#x>" subrp "%s" "#<unknown %#x>"] 5 (#$ . 2433)])
#@14
(fn ENTRY)
(defalias 'profiler-fixup-entry #[257 "\2119\203 \207\300!\207" [profiler-format-entry] 3 (#$ . 2858)])
#@18
(fn BACKTRACE)
(defalias 'profiler-fixup-backtrace #[257 "\300\301\302\303\"\"\207" [apply vector mapcar profiler-fixup-entry] 6 (#$ . 2983)])
#@57 Compare LOG1 with LOG2 and return diff.
(fn LOG1 LOG2)
(defalias 'profiler-compare-logs #[514 "\300\301\302\"\303\304\305\306\307\310!\311\"\312\313%\"\210\303\304\305\314\307\310\"\315\"\316\313%\"\210\211\207" [make-hash-table :test equal maphash make-byte-code 514 "\301\300#\207" vconcat vector [puthash] 6 "\n\n(fn BACKTRACE COUNT)" "\302\303\300\304#Z\301#\207" [puthash gethash 0] 8] 11 (#$ . 3135)])
#@12
(fn LOG)
(defalias 'profiler-fixup-log #[257 "\300\301\302\"\303\304\305\306\307\310!\311\"\312\313%\"\210\211\207" [make-hash-table :test equal maphash make-byte-code 514 "\301\302!\300#\207" vconcat vector [puthash profiler-fixup-backtrace] 6 "\n\n(fn BACKTRACE COUNT)"] 9 (#$ . 3563)])
#@77 compiler-macro for inlining `profiler-profile-tag'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-profile-tag--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-profile-tag (progn (aref cl-x 0))) nil] 9 (#$ . 3865)])
(put 'profiler-profile-tag 'compiler-macro 'profiler-profile-tag--cmacro)
#@65 Access slot "tag" of `profiler-profile' struct CL-X.
(fn CL-X)
(defalias 'profiler-profile-tag #[257 "\211\300H\207" [0] 3 (#$ . 4205)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-profile-tag side-effect-free t] 4)
#@81 compiler-macro for inlining `profiler-profile-version'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-profile-version--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-profile-version (progn (aref cl-x 1))) nil] 9 (#$ . 4446)])
(put 'profiler-profile-version 'compiler-macro 'profiler-profile-version--cmacro)
#@69 Access slot "version" of `profiler-profile' struct CL-X.
(fn CL-X)
(defalias 'profiler-profile-version #[257 "\211\300H\207" [1] 3 (#$ . 4806)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-profile-version side-effect-free t] 4)
#@78 compiler-macro for inlining `profiler-profile-type'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-profile-type--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-profile-type (progn (aref cl-x 2))) nil] 9 (#$ . 5059)])
(put 'profiler-profile-type 'compiler-macro 'profiler-profile-type--cmacro)
#@66 Access slot "type" of `profiler-profile' struct CL-X.
(fn CL-X)
(defalias 'profiler-profile-type #[257 "\211\300H\207" [2] 3 (#$ . 5404)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-profile-type side-effect-free t] 4)
#@77 compiler-macro for inlining `profiler-profile-log'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-profile-log--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-profile-log (progn (aref cl-x 3))) nil] 9 (#$ . 5648)])
(put 'profiler-profile-log 'compiler-macro 'profiler-profile-log--cmacro)
#@65 Access slot "log" of `profiler-profile' struct CL-X.
(fn CL-X)
(defalias 'profiler-profile-log #[257 "\211\300H\207" [3] 3 (#$ . 5988)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-profile-log side-effect-free t] 4)
#@83 compiler-macro for inlining `profiler-profile-timestamp'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-profile-timestamp--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-profile-timestamp (progn (aref cl-x 4))) nil] 9 (#$ . 6229)])
(put 'profiler-profile-timestamp 'compiler-macro 'profiler-profile-timestamp--cmacro)
#@71 Access slot "timestamp" of `profiler-profile' struct CL-X.
(fn CL-X)
(defalias 'profiler-profile-timestamp #[257 "\211\300H\207" [4] 3 (#$ . 6599)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-profile-timestamp side-effect-free t] 4)
#@80 compiler-macro for inlining `profiler-profile-diff-p'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-profile-diff-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-profile-diff-p (progn (aref cl-x 5))) nil] 9 (#$ . 6858)])
(put 'profiler-profile-diff-p 'compiler-macro 'profiler-profile-diff-p--cmacro)
#@68 Access slot "diff-p" of `profiler-profile' struct CL-X.
(fn CL-X)
(defalias 'profiler-profile-diff-p #[257 "\211\300H\207" [5] 3 (#$ . 7213)])
(byte-code "\300\301\302\303#\304\305\306\"\207" [function-put profiler-profile-diff-p side-effect-free t defalias copy-profiler-profile copy-sequence] 4)
#@122 compiler-macro for inlining `profiler-make-profile'.
(fn CL-WHOLE &cl-quote &key TAG VERSION TYPE LOG TIMESTAMP DIFF-P)
(defalias 'profiler-make-profile--cmacro #[385 "\300\301\"\206 \302A@\300\303\"\206 \304A@\300\305\"A@\300\306\"A@\300\307\"A@\300\310\"A@\211\203Z \211@\311>\203B \211AA\262\202/ \312>A@\203Q \313\262\202/ \314\315@\"\210\202/ \210\316\317\320\313\313&\207" [plist-member :tag (nil 'profiler-profile) :version (nil profiler-version) :type :log :timestamp :diff-p (:tag :version :type :log :timestamp :diff-p :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:tag :version :type :log :timestamp :diff-p)" cl--defsubst-expand (tag version type log timestamp diff-p) (cl-block profiler-make-profile (vector tag version type log timestamp diff-p))] 20 (#$ . 7519)])
(put 'profiler-make-profile 'compiler-macro 'profiler-make-profile--cmacro)
#@102 Constructor for objects of type `profiler-profile'.
(fn &key TAG VERSION TYPE LOG TIMESTAMP DIFF-P)
(defalias 'profiler-make-profile #[128 "\301\302\"\206 \303A@\301\304\"\206 \305DA@\301\306\"A@\301\307\"A@\301\310\"A@\301\311\"A@\211\203\\ \211@\312>\203D \211AA\262\2021 \313>A@\203S \305\262\2021 \314\315@\"\210\2021 \210\316&\207" [profiler-version plist-member :tag (nil profiler-profile) :version nil :type :log :timestamp :diff-p (:tag :version :type :log :timestamp :diff-p :allow-other-keys) :allow-other-keys error "Keyword argument %s not one of (:tag :version :type :log :timestamp :diff-p)" vector] 14 (#$ . 8447)])
(byte-code "\300\301\302\303#\304\305\306\211\307\306\310\311\305\306& \207" [function-put profiler-make-profile side-effect-free t cl-struct-define profiler-profile nil vector ((tag 'profiler-profile) (version profiler-version) (type) (log) (timestamp) (diff-p)) cl-struct-profiler-profile-tags] 11)
#@73 Compare PROFILE1 with PROFILE2 and return diff.
(fn PROFILE1 PROFILE2)
(defalias 'profiler-compare-profiles #[514 "\300H\300H=\204 \301\302!\210\303\304\300H\305\306 \307\310\311\312\n\313H\n\313H\"&\207" [2 error "Can't compare different type of profiles" profiler-make-profile :type :timestamp current-time :diff-p t :log profiler-compare-logs 3] 14 (#$ . 9416)])
#@80 Fixup PROFILE so that the profile could be serialized into file.
(fn PROFILE)
(defalias 'profiler-fixup-profile #[257 "\300\301\302H\303\304H\305\306H\307\310 \311H!&\207" [profiler-make-profile :type 2 :timestamp 4 :diff-p 5 :log profiler-fixup-log 3] 12 (#$ . 9796)])
#@76 Write PROFILE into file FILENAME.
(fn PROFILE FILENAME &optional CONFIRM)
(defalias 'profiler-write-profile #[770 "\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216\313\211\314\315!p\"\210*\316\"*\207" [print-length print-level generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 nil print profiler-fixup-profile write-file] 10 (#$ . 10079)])
#@49 Read profile from file FILENAME.
(fn FILENAME)
(defalias 'profiler-read-profile #[257 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216\311!\210eb\210\312p!*\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents read] 8 (#$ . 10510)])
#@142 Return non-nil if the profiler is running.
Optional argument MODE means only check for the specified mode (cpu or mem).
(fn &optional MODE)
(defalias 'profiler-running-p #[256 "\211\300\267\202 \301\302!\205 \302 \207\303 \207\304\305!\206 \304\306!\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (cpu 6 mem 15)) fboundp profiler-cpu-running-p profiler-memory-running-p profiler-running-p cpu mem] 3 (#$ . 10856)])
(defvar profiler-cpu-log nil)
(defvar profiler-memory-log nil)
#@21 Return CPU profile.
(defalias 'profiler-cpu-profile #[0 "\302\303\304 \305 \306&\207" [profiler-version profiler-cpu-log vector profiler-profile cpu current-time nil] 7 (#$ . 11388)])
#@24 Return memory profile.
(defalias 'profiler-memory-profile #[0 "\302\303\304 \305 \306&\207" [profiler-version profiler-memory-log vector profiler-profile memory current-time nil] 7 (#$ . 11580)])
#@76 compiler-macro for inlining `profiler-calltree-p'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-calltree-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-calltree-p (and (memq (type-of cl-x) cl-struct-profiler-calltree-tags) t)) nil] 9 (#$ . 11784)])
(put 'profiler-calltree-p 'compiler-macro 'profiler-calltree-p--cmacro)
#@13
(fn CL-X)
(defalias 'profiler-calltree-p #[257 "\301!>\205 \302\207" [cl-struct-profiler-calltree-tags type-of t] 3 (#$ . 12161)])
(byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put profiler-calltree-p side-effect-free error-free put profiler-calltree cl-deftype-satisfies] 5)
#@80 compiler-macro for inlining `profiler-calltree-entry'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-calltree-entry--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-calltree-entry (progn (or (profiler-calltree-p cl-x) (signal 'wrong-type-argument (list 'profiler-calltree cl-x))) (aref cl-x 1))) nil] 9 (#$ . 12464)])
(put 'profiler-calltree-entry 'compiler-macro 'profiler-calltree-entry--cmacro)
#@68 Access slot "entry" of `profiler-calltree' struct CL-X.
(fn CL-X)
(defalias 'profiler-calltree-entry #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-profiler-calltree-tags type-of signal wrong-type-argument profiler-calltree 1] 5 (#$ . 12913)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-calltree-entry side-effect-free t] 4)
#@80 compiler-macro for inlining `profiler-calltree-count'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-calltree-count--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-calltree-count (progn (or (profiler-calltree-p cl-x) (signal 'wrong-type-argument (list 'profiler-calltree cl-x))) (aref cl-x 2))) nil] 9 (#$ . 13284)])
(put 'profiler-calltree-count 'compiler-macro 'profiler-calltree-count--cmacro)
#@68 Access slot "count" of `profiler-calltree' struct CL-X.
(fn CL-X)
(defalias 'profiler-calltree-count #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-profiler-calltree-tags type-of signal wrong-type-argument profiler-calltree 2] 5 (#$ . 13733)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-calltree-count side-effect-free t] 4)
#@88 compiler-macro for inlining `profiler-calltree-count-percent'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-calltree-count-percent--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-calltree-count-percent (progn (or (profiler-calltree-p cl-x) (signal 'wrong-type-argument (list 'profiler-calltree cl-x))) (aref cl-x 3))) nil] 9 (#$ . 14104)])
(put 'profiler-calltree-count-percent 'compiler-macro 'profiler-calltree-count-percent--cmacro)
#@76 Access slot "count-percent" of `profiler-calltree' struct CL-X.
(fn CL-X)
(defalias 'profiler-calltree-count-percent #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-profiler-calltree-tags type-of signal wrong-type-argument profiler-calltree 3] 5 (#$ . 14593)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-calltree-count-percent side-effect-free t] 4)
#@81 compiler-macro for inlining `profiler-calltree-parent'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-calltree-parent--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-calltree-parent (progn (or (profiler-calltree-p cl-x) (signal 'wrong-type-argument (list 'profiler-calltree cl-x))) (aref cl-x 4))) nil] 9 (#$ . 14988)])
(put 'profiler-calltree-parent 'compiler-macro 'profiler-calltree-parent--cmacro)
#@69 Access slot "parent" of `profiler-calltree' struct CL-X.
(fn CL-X)
(defalias 'profiler-calltree-parent #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-profiler-calltree-tags type-of signal wrong-type-argument profiler-calltree 4] 5 (#$ . 15442)])
(byte-code "\300\301\302\303#\300\207" [function-put profiler-calltree-parent side-effect-free t] 4)
#@83 compiler-macro for inlining `profiler-calltree-children'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'profiler-calltree-children--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block profiler-calltree-children (progn (or (profiler-calltree-p cl-x) (signal 'wrong-type-argument (list 'profiler-calltree cl-x))) (aref cl-x 5))) nil] 9 (#$ . 15816)])
(put 'profiler-calltree-children 'compiler-macro 'profiler-calltree-children--cmacro)
#@71 Access slot "children" of `profiler-calltree' struct CL-X.
(fn CL-X)
(defalias 'profiler-calltree-children #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-profiler-calltree-tags type-of signal wrong-type-argument profiler-calltree 5] 5 (#$ . 16280)])
(byte-code "\300\301\302\303#\304\305\306\"\207" [function-put profiler-calltree-children side-effect-free t defalias copy-profiler-calltree copy-sequence] 4)
#@127 compiler-macro for inlining `profiler-make-calltree'.
(fn CL-WHOLE &cl-quote &key ENTRY COUNT COUNT-PERCENT PARENT CHILDREN)
(defalias 'profiler-make-calltree--cmacro #[385 "\300\301\"A@\300\302\"\206 \303A@\300\304\"\206 \305A@\300\306\"A@\300\307\"A@\211\203R \211@\310>\203: \211AA\262\202'