Mercurial > hg > xemacs-beta
view 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 |
line wrap: on
line source
Protect Your Freedom to Write Programs Join the League for Programming Freedom (Version of February 3, 1994) Ten years ago, programmers were allowed to write programs using all the techniques they knew, and providing whatever features they felt were useful. This is no longer the case. New monopolies, known as software patents and interface copyrights, have taken away our freedom of expression and our ability to do a good job. "Look and feel" lawsuits attempt to monopolize well-known command languages; some have succeeded. Copyrights on command languages enforce gratuitous incompatibility, close opportunities for competition, and stifle incremental improvements. Software patents are even more dangerous; they make every design decision in the development of a program carry a risk of a lawsuit, with draconian pretrial seizure. It is difficult and expensive to find out whether the techniques you consider using are patented; it is impossible to find out whether they will be patented in the future. The League for Programming Freedom is a grass-roots organization of professors, students, businessmen, programmers and users dedicated to bringing back the freedom to write programs. The League is not opposed to the legal system that Congress expressly established for software--copyright on individual programs. Our aim is to reverse the recent changes that prevent programmers from doing their work. The League works to abolish the new monopolies by publishing articles, talking with public officials, denouncing egregious offenders, and filing amicus curiae briefs, most notably against Lotus in its suit against Borland. We testified twice at the recent Patent Office hearings on software patents. We welcome suggestions for other activities, as well as help in carrying them out. Membership dues in the League are $42 per year for programmers, managers and professionals; $10.50 for students; $21 for others. Please give more if you can. The League's funds will be used for filing briefs; for printing handouts, buttons and signs; whatever will persuade the courts, the legislators, and the people. You may not get anything personally for your dues--except for the freedom to write programs. The League is a non-profit corporation, but not considered a tax-exempt charity. However, for those self-employed in software, the dues can be a business expense. The League needs both activist members and members who only pay their dues. We also greatly need additional corporate members; contact us for information. If you have any questions, please write to the League, phone +1 617 621 7084, or send Internet mail to lpf@uunet.uu.net. Chris Hofstader, President Dean Anderson, Secretary Aubrey Jaffer, Treasurer Chris Hofstader can be reached at (617) 492-0023; FAX (617) 497-1632. To join, please send a check and the following information to: League for Programming Freedom 1 Kendall Square #143 P.O.Box 9171 Cambridge, Massachusetts 02139 (Outside the US, please send a check in US dollars on a bank having a US correspondent bank, to save us check cashing fees.) Your name: The address for League mailings, a few each year; please indicate whether it is your home address or your work address: The company you work for, and your position: Your phone numbers (home, work or both): Your email address, so we can contact you for demonstrations or for writing letters. (If you don't want us to contact you for these things, please say so, but please give us your email address anyway so we can save paper and postage by sending you the newsletter by email.) Is there anything about you which would enable your endorsement of the LPF to impress the public? For example, if you are or have been a professor or an executive, or have written software that has a good reputation, please tell us. Would you like to help with LPF activities? The corporate charter of the League for Programming Freedom states: The purpose of the corporation is to engage in the following activities: 1. To determine the existence of, and warn the public about restrictions and monopolies on classes of computer programs where such monopolies prevent or restrict the right to develop certain types of computer programs. 2. To develop countermeasures and initiatives, in the public interest, effective to block or otherwise prevent or restrain such monopolistic activities including education, research, publications, public assembly, legislative testimony, and intervention in court proceedings involving public interest issues (as a friend of the court). 3. To engage in any business or other activity in service of and related to the foregoing paragraphs that lawfully may be carried on by a corporation organized under Chapter 180 of the Massachusetts General Laws. The officers and directors of the League will be elected annually by the members.