• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/obsolete/

Lines Matching +defs:print +defs:function

35 ;; inside these functions.  (Actually, for each function it reports the amount
36 ;; of time spent while at least one instance of that function is on the call
37 ;; stack. So if profiled function FOO calls profiled function BAR, the time
66 ;; To set one function at a time (instead of or in addition to setting the
67 ;; above list and M-x profile-functions) use M-x profile-a-function.
79 "If non-nil, each time slice gets credited to at most one function.
81 time reported for a function includes the entire time from beginning
82 to end, even if it called some other function that was also profiled.")
89 "List of cumulative calls and time for each profiled function.
92 "List of entry time for each function.
98 "Max length of name of any function profiled.")
116 (mapcar 'profile-a-function (or flist profile-functions-list)))
118 (defun profile-print (entry)
144 (mapcar 'profile-print profile-time-list))
164 (defun profile-function-prolog (fun)
165 "Mark the beginning of a call to function FUN."
182 (defun profile-function-epilog (fun)
183 "Mark the end of a call to function FUN."
203 (defun profile-convert-byte-code (function)
204 (let ((defn (symbol-function function)))
205 (if (byte-code-function-p defn)
215 ;; in case the compiled function has a reference
217 (setq body (cons (documentation function) body)))
218 (fset function (cons 'lambda (cons (car contents) body)))))))
220 (defun profile-a-function (fun)
221 "Profile the function FUN."
223 (let ((def (symbol-function fun)))
226 (setq def (symbol-function fun)))
229 (let ((def (symbol-function fun)) (funlen (length (symbol-name fun))))
231 (error "To profile: %s must be a user-defined function" fun))
240 "Take function FUN and return it fixed for profiling.
241 DEF is (symbol-function FUN)."
258 (if (eq (car-safe (car suffix)) 'profile-function-prolog)
260 ;; Prepare new function definition.
263 (list (list 'profile-function-prolog
267 (list 'profile-function-epilog
271 "Restore profiled function FUN to its original state."
272 (let ((def (symbol-function fun)) body index)
279 (if (eq (car-safe (car (cdr index))) 'profile-function-prolog)