annotate etc/LPF @ 1292:f3437b56874d

[xemacs-hg @ 2003-02-13 09:57:04 by ben] profile updates profile.c: Major reworking. Keep track of new information -- total function timing (includes descendants), GC usage, total GC usage (includes descendants). New functions to be called appropriately from eval.c, alloc.c to keep track of this information. Keep track of when we're actually in a function vs. in its profile, for more accurate timing counts. Track profile overhead separately. Create new mechanism for specifying "internal sections" that are tracked just like regular Lisp functions and even appear in the backtrace if `backtrace-with-internal-sections' is non-nil (t by default for error-checking builds). Add some KKCC information for the straight (non-Elisp) hash table used by profile, which contains Lisp objects in its keys -- but not used yet. Remove old ad-hoc methods for tracking garbage collection, redisplay (which was incorrect anyway when Lisp was called within these sections). Don't record any tick info when blocking under MS Windows, since the timer there is in real time rather than in process time. Make `start-profiling', `stop-profiling' interactive. Be consistent wrt. recursive functions and functions currently on the stack when starting or stopping -- together these make implementing the `total' values extremely difficult. When we start profiling, we act as if we just entered all the functions currently on the stack. Likewise when exiting. Create vars in_profile for tracking time spent inside of profiling, and profiling_lock for setting exclusive access to the main hash table when reading from it or modifying it. (protects against getting screwed up by the signal handle going off at the same time. profile.h: New file. Create macros for declaring internal profiling sections. lisp.h: Move profile-related stuff to profile.h. alloc.c: Keep track of total consing, for profile. Tell profile when we are consing. Use new profile-section method for noting garbage-collection. alloc.c: Abort if we attempt to call the allocator reentrantly. backtrace.h, eval.c: Add info for use by profile in the backtrace frame and transfer PUSH_BACKTRACE/POP_BACKTRACE from eval.c, for use with profile. elhash.c: Author comment. eval.c, lisp.h: New Lisp var `backtrace-with-internal-sections'. Set to t when error-checking is on. eval.c: When unwinding, eval.c: Report to profile when we are about-to-call and just-called wrt. a function. alloc.c, eval.c: Allow for "fake" backtrace frames, for internal sections (used by profile and `backtrace-with-internal-sections'. event-Xt.c, event-gtk.c, event-msw.c, event-tty.c: Record when we are actually blocking on an event, for profile's sake. event-stream.c: Record internal profiling sections for getting, dispatching events. extents.c: Record internal profiling sections for map_extents. hash.c, hash.h: Add pregrow_hash_table_if_necessary(). (Used in profile code since the signal handler is the main grower but can't allow a realloc(). We make sure, at critical points, that the table is large enough.) lread.c: Create internal profiling sections for `load' (which may be triggered internally by autoload, etc.). redisplay.c: Remove old profile_redisplay_flag. Use new macros to declare internal profiling section for redisplay. text.c: Use new macros to declare internal profiling sections for char-byte conversion and internal-external conversion. SEMI-UNRELATED CHANGES: ----------------------- text.c: Update the long comments.
author ben
date Thu, 13 Feb 2003 09:57:08 +0000
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 Protect Your Freedom to Write Programs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Join the League for Programming Freedom
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 (Version of February 3, 1994)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 Ten years ago, programmers were allowed to write programs using all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 the techniques they knew, and providing whatever features they felt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 were useful. This is no longer the case. New monopolies, known as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 software patents and interface copyrights, have taken away our freedom
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 of expression and our ability to do a good job.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 "Look and feel" lawsuits attempt to monopolize well-known command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 languages; some have succeeded. Copyrights on command languages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 enforce gratuitous incompatibility, close opportunities for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 competition, and stifle incremental improvements.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 Software patents are even more dangerous; they make every design
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 decision in the development of a program carry a risk of a lawsuit,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 with draconian pretrial seizure. It is difficult and expensive to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 find out whether the techniques you consider using are patented; it is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 impossible to find out whether they will be patented in the future.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 The League for Programming Freedom is a grass-roots organization of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 professors, students, businessmen, programmers and users dedicated to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 bringing back the freedom to write programs. The League is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 opposed to the legal system that Congress expressly established for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 software--copyright on individual programs. Our aim is to reverse the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 recent changes that prevent programmers from doing their work.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 The League works to abolish the new monopolies by publishing articles,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 talking with public officials, denouncing egregious offenders, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 filing amicus curiae briefs, most notably against Lotus in its suit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 against Borland. We testified twice at the recent Patent Office
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 hearings on software patents. We welcome suggestions for other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 activities, as well as help in carrying them out.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 Membership dues in the League are $42 per year for programmers,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 managers and professionals; $10.50 for students; $21 for others.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 Please give more if you can. The League's funds will be used for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 filing briefs; for printing handouts, buttons and signs; whatever will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 persuade the courts, the legislators, and the people. You may not get
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 anything personally for your dues--except for the freedom to write
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 programs. The League is a non-profit corporation, but not considered
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 a tax-exempt charity. However, for those self-employed in software,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 the dues can be a business expense.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 The League needs both activist members and members who only pay their
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 dues. We also greatly need additional corporate members; contact us
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 for information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 If you have any questions, please write to the League, phone
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 +1 617 621 7084, or send Internet mail to lpf@uunet.uu.net.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 Chris Hofstader, President
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 Dean Anderson, Secretary
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 Aubrey Jaffer, Treasurer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 Chris Hofstader can be reached at (617) 492-0023; FAX (617) 497-1632.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 To join, please send a check and the following information to:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 League for Programming Freedom
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 1 Kendall Square #143
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 P.O.Box 9171
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 Cambridge, Massachusetts 02139
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (Outside the US, please send a check in US dollars on a bank
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 having a US correspondent bank, to save us check cashing fees.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 Your name:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 The address for League mailings, a few each year; please indicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 whether it is your home address or your work address:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 The company you work for, and your position:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 Your phone numbers (home, work or both):
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 Your email address, so we can contact you for demonstrations or for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 writing letters. (If you don't want us to contact you for these
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 things, please say so, but please give us your email address anyway
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 so we can save paper and postage by sending you the newsletter by email.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 Is there anything about you which would enable your endorsement of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 LPF to impress the public? For example, if you are or have been a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 professor or an executive, or have written software that has a good
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 reputation, please tell us.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 Would you like to help with LPF activities?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 The corporate charter of the League for Programming Freedom states:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 The purpose of the corporation is to engage in the following
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 activities:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 1. To determine the existence of, and warn the public about
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 restrictions and monopolies on classes of computer programs where such
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 monopolies prevent or restrict the right to develop certain types of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 computer programs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 2. To develop countermeasures and initiatives, in the public interest,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 effective to block or otherwise prevent or restrain such monopolistic
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 activities including education, research, publications, public
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 assembly, legislative testimony, and intervention in court proceedings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 involving public interest issues (as a friend of the court).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 3. To engage in any business or other activity in service of and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 related to the foregoing paragraphs that lawfully may be carried on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 by a corporation organized under Chapter 180 of the Massachusetts
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 General Laws.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 The officers and directors of the League will be elected annually by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 the members.