aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-26 15:49:29 +0000
committerRichard M. Stallman1994-12-26 15:49:29 +0000
commit5b689f602f3be7d6a2224667372a8aa460a990a7 (patch)
treea3777c6f92aa158ca9887c290ccce0db7d3b246d
parent1af1b1e840d64eab568073df04e408597c5ba83f (diff)
downloademacs-5b689f602f3be7d6a2224667372a8aa460a990a7.tar.gz
emacs-5b689f602f3be7d6a2224667372a8aa460a990a7.zip
Comment changes.
-rw-r--r--lisp/emacs-lisp/elp.el103
1 files changed, 50 insertions, 53 deletions
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index bbdf5b96cb0..fc52ed04eae 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -1,6 +1,5 @@
1;;; elp.el --- Emacs Lisp Profiler 1;;; elp.el --- Emacs Lisp Profiler
2 2
3;; Copyright (C) 1994 Barry A. Warsaw
4;; Copyright (C) 1994 Free Software Foundation, Inc. 3;; Copyright (C) 1994 Free Software Foundation, Inc.
5 4
6;; Author: 1994 Barry A. Warsaw <bwarsaw@cnri.reston.va.us> 5;; Author: 1994 Barry A. Warsaw <bwarsaw@cnri.reston.va.us>
@@ -28,54 +27,6 @@
28 27
29;;; Commentary: 28;;; Commentary:
30;; 29;;
31;; This program is based on the only two existing Emacs Lisp profilers
32;; that I'm aware of, Boaz Ben-Zvi's profile.el, and Root Boy Jim's
33;; profiler.el. Both were written for Emacs 18 and both were pretty
34;; good first shots at profiling, but I found that they didn't provide
35;; the functionality or interface that I wanted. So I wrote this.
36;; I've tested elp in both Emacs 19's. There's no point in even
37;; trying to make this work with Emacs 18.
38
39;; Unlike previous profilers, elp uses Emacs 19's built-in function
40;; current-time to return interval times. This obviates the need for
41;; both an external C program and Emacs processes to communicate with
42;; such a program, and thus simplifies the package as a whole. One
43;; small shortcut: I throw away the most significant 16 bits of
44;; seconds returned by current-time since I doubt anyone will ever
45;; want to profile stuff on the order of 18 hours. 2^16 == 65536
46;; seconds == ~1092 minutes == ~18 hours.
47
48;; Note that there are plenty of factors that could make the times
49;; reported unreliable, including the accuracy and granularity of your
50;; system clock, and the overhead spent in lisp calculating and
51;; recording the intervals. The latter I figure is pretty constant
52;; so, while the times may not be entirely accurate, I think they'll
53;; give you a good feel for the relative amount of work spent in the
54;; various lisp routines you are profiling. Note further that times
55;; are calculated using wall-clock time, so other system load will
56;; affect accuracy too.
57
58;; Here is a list of variable you can use to customize elp:
59;; elp-function-list
60;; elp-reset-after-results
61;; elp-sort-by-function
62;; elp-report-limit
63;;
64;; Here is a list of the interactive commands you can use:
65;; elp-instrument-function
66;; elp-restore-function
67;; elp-instrument-list
68;; elp-restore-list
69;; elp-instrument-package
70;; elp-restore-all
71;; elp-reset-function
72;; elp-reset-list
73;; elp-reset-all
74;; elp-set-master
75;; elp-unset-master
76;; elp-results
77;; elp-submit-bug-report
78;;
79;; Here are some brief usage notes. If you want to profile a bunch of 30;; Here are some brief usage notes. If you want to profile a bunch of
80;; functions, set elp-function-list to the list of symbols, then call 31;; functions, set elp-function-list to the list of symbols, then call
81;; elp-instrument-list. This hacks the functions so that profiling 32;; elp-instrument-list. This hacks the functions so that profiling
@@ -123,10 +74,55 @@
123;; elp-restore-function. The other instrument, restore, and reset 74;; elp-restore-function. The other instrument, restore, and reset
124;; functions are provided for symmetry. 75;; functions are provided for symmetry.
125 76
126;; LCD Archive Entry: 77;; Note that there are plenty of factors that could make the times
127;; elp|Barry A. Warsaw|tools-help@anthem.nlm.nih.gov| 78;; reported unreliable, including the accuracy and granularity of your
128;; Emacs Lisp Profiler| 79;; system clock, and the overhead spent in lisp calculating and
129;; 1994/12/23 17:46:21|2.22|~/misc/elp.el.Z| 80;; recording the intervals. The latter I figure is pretty constant
81;; so, while the times may not be entirely accurate, I think they'll
82;; give you a good feel for the relative amount of work spent in the
83;; various lisp routines you are profiling. Note further that times
84;; are calculated using wall-clock time, so other system load will
85;; affect accuracy too.
86
87;; Here is a list of variable you can use to customize elp:
88;; elp-function-list
89;; elp-reset-after-results
90;; elp-sort-by-function
91;; elp-report-limit
92;;
93;; Here is a list of the interactive commands you can use:
94;; elp-instrument-function
95;; elp-restore-function
96;; elp-instrument-list
97;; elp-restore-list
98;; elp-instrument-package
99;; elp-restore-all
100;; elp-reset-function
101;; elp-reset-list
102;; elp-reset-all
103;; elp-set-master
104;; elp-unset-master
105;; elp-results
106;; elp-submit-bug-report
107
108;;; Background:
109
110;; This program is based on the only two existing Emacs Lisp profilers
111;; that I'm aware of, Boaz Ben-Zvi's profile.el, and Root Boy Jim's
112;; profiler.el. Both were written for Emacs 18 and both were pretty
113;; good first shots at profiling, but I found that they didn't provide
114;; the functionality or interface that I wanted. So I wrote this.
115;; I've tested elp in GNU Emacs 19 and in GNU XEmacs. There's no
116;; point in even trying to make this work with Emacs 18.
117
118;; Unlike previous profilers, elp uses Emacs 19's built-in function
119;; current-time to return interval times. This obviates the need for
120;; both an external C program and Emacs processes to communicate with
121;; such a program, and thus simplifies the package as a whole. One
122;; small shortcut: I throw away the most significant 16 bits of
123;; seconds returned by current-time since I doubt anyone will ever
124;; want to profile stuff on the order of 18 hours. 2^16 == 65536
125;; seconds == ~1092 minutes == ~18 hours.
130 126
131;;; Code: 127;;; Code:
132 128
@@ -553,4 +549,5 @@ displayed."
553 549
554 550
555(provide 'elp) 551(provide 'elp)
552
556;; elp.el ends here 553;; elp.el ends here