Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/HISTORY
ViewVC logotype

Diff of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 670, Sun Jun 18 13:10:57 2000 UTC revision 690, Sat Jul 22 14:29:23 2000 UTC
# Line 13  Line 13 
13  Description:  Description:
14  ----------------------------------------------------------------------  ----------------------------------------------------------------------
15  Name: Matthias Blume  Name: Matthias Blume
16    Date: 2000/07/22 23:30:00 JST
17    Tag: blume-20000722-urlupdate
18    Description:
19    
20    Changed BOOT and config/srcarchiveurl to point to BL server:
21    
22        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
23    
24    ----------------------------------------------------------------------
25    Name: Matthias Blume
26    Date: 2000/07/18 18:00:00 JST
27    Tag: blume-20000718-Version_110_29
28    Description:
29    
30    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
31    
32    2. Updated config/version to 110.29
33    
34    3. Updated config/srcarchiveurl
35    
36    3. New boot files!
37       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
38    
39    ----------------------------------------------------------------------
40    Name: Matthias Blume
41    Date: 2000/07/11 13:58:00 JST
42    Tag: blume-20000711-doctypo
43    Description:
44    
45    Fixed a few typos in CM manual.
46    
47    ----------------------------------------------------------------------
48    Name: Allen Leung
49    Date: 2000/06/15 00:38:00
50    Tag: leunga-20000704-sparc-x86
51    
52    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
53    2. fix to x86 RET bug [found by Dan Grossman]
54    3. sparc assembly bug fix for ticc instructions [found by Fermin]
55    
56       Affects c-- and moby only
57    
58    ----------------------------------------------------------------------
59    Name: Matthias Blume
60    Date: 2000/07/04 15:26:00
61    Tag: blume-20000704-trigger
62    Description:
63    
64    1. Improvements to CM manual.
65    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
66       of getting a back-trace.  The function, when called, raises an
67       internal exception which explicitly carries the full back-trace history,
68       so it is unaffected by any intervening handle-raise pairs ("trivial"
69       or not).  The interactive loop will print that history once it arrives
70       at top level.
71       Short of having all exceptions implicitly carry the full history, the
72       recommended way of using this facility is:
73         - compile your program with instrumentation "on"
74         - run it, when it raises an exception, look at the history
75         - if the history is "cut off" because of some handler, go and modify
76           your program so that it explicitly calls BTrace.trigger
77         - recompile (still instrumented), and rerun; look at the full history
78    
79    ----------------------------------------------------------------------
80    Name: Matthias Blume
81    Date: 2000/07/03 15:36:00 JST
82    Tag: blume-20000702-manual
83    Description:
84    
85    Small corrections and updates to CM manual.
86    
87    ----------------------------------------------------------------------
88    Name: Matthias Blume
89    Date: 2000/06/29 16:04:00 JST
90    Tag: blume-20000629-yacctool
91    Description:
92    
93    Changes:
94    
95    1. Class "mlyacc" now takes separate arguments to pass options to
96       generated .sml- and .sig-files independently.
97    2. Corresponding CM manual updates.
98    3. BTrace module now also reports call sites.  (However, for loop clusters
99       it only shows from where the cluster was entered.)  There are associated
100       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
101    
102    ----------------------------------------------------------------------
103    Name: Matthias Blume
104    Date: 2000/06/27 16:51:00 JST
105    Tag: blume-20000627-noweb
106    Description:
107    
108    Changes:
109    
110     1. Implemented "subdir" and "witness" options for noweb tool.
111        This caused some slight internal changes in CM's tool implementation.
112     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
113        some remaining issues from earlier path anchor changes.
114     3. Updated CM manual accordingly.
115    
116     4. Changed implementation of back-tracing so that I now consider it
117        ready for prime-time.
118    
119        In particular, you don't have to explicitly trigger the back-trace
120        anymore.  Instead, if you are running BTrace-instrumented code and
121        there is an uncaught exception (regardless of whether or not it was
122        raised in instrumented code), the top-level evalloop will print
123        the back-trace.
124    
125        Features:
126    
127          - Instrumented and uninstrumented code work together seemlessly.
128            (Of course, uninstrumented code is never mentioned in actual
129             back-traces.)
130    
131          - Asymptotic time- and space-complexity of instrumented code is
132            equal to that of uninstrumented code.  (This means that
133            tail-recursion is preserved by the instrumentation phase.)
134    
135          - Modules whose code has been instrumented in different sessions
136            work together without problem.
137    
138          - There is no penalty whatsoever on uninstrumented code.
139    
140          - There is no penalty on "raise" expressions, even in
141            instrumented code.
142    
143        A potential bug (or perhaps it is a feature, too):
144    
145          A back-trace reaches no further than the outermost instrumented
146          non-trivial "raise".  Here, a "trivial" raise is one that is the
147          sole RHS of a "handle" rule.  Thus, back-traces reach trough
148    
149               <exp> handle e => raise e
150    
151          and even
152    
153               <exp> handle Foo => raise Bar
154    
155          and, of course, through
156    
157               <exp> handle Foo => ...
158    
159         if the exception was not Foo.
160    
161         Back-traces always reach right through any un-instrumented code
162         including any of its "handle" expressions, trivial or not.
163    
164       To try this out, do the following:
165    
166         - Erase all existing binfiles for your program.
167           (You may keep binfiles for those modules where you think you
168            definitely don't need back-tracing.)
169         - Turn on back-trace instrumentation:
170              SMLofNJ.Internals.BTrace.mode (SOME true);
171         - Recompile your program.  (I.e., run "CM.make" or "use".)
172         - You may now turn instrumentation off again (if you want):
173              SMLofNJ.Internals.BTrace.mode (SOME false);
174         - Run your program as usual.  If it raises an exception that
175           reaches the interactive toplevel, then a back-trace will
176           automatically be printed.  After that, the toplevel loop
177           will print the exception history as usual.
178    
179    ----------------------------------------------------------------------
180    Name: Matthias Blume
181    Date: 2000/06/26 09:56:46 JST
182    Tag: blume-20000626-setup
183    Description:
184    
185    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
186          ML code before and after compiling a file (e.g., to set compiler
187          flags)
188    
189    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
190              - associated changes to btrace.sml (BTrace instrumentation pass)
191              - cleaner implementation of btimp.sml (BTrace tracing and report
192                module)
193    
194    CM manual: * new path encoding documented
195               * description of setup-parameter to "sml" added
196    
197    The biggest user-visible change to back-tracing is that it is no
198    longer necessary to compile all traced modules within the same
199    session.  (This was a real limitation.)
200    
201    ----------------------------------------------------------------------
202    Name: Matthias Blume
203    Date: 2000/06/24 12:40:00 JST
204    Tag: blume-20000624-startup
205    Description:
206    
207    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
208    bit too often -- to put it mildly. :)
209    
210    ----------------------------------------------------------------------
211    Name: Matthias Blume
212    Date: 2000/06/23 18:20:00 JST
213    Tag: blume-20000623-btrace
214    Description:
215    
216    This updates adds a backtrace facility to aid programmers in debugging
217    their programs.  This involves the following changes:
218    
219    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
220       keeping track of the current call stack.  When programs are compiled
221       in a special mode, the compiler will insert calls to these hooks
222       into the user program.
223       "Hook" means that it is possible for different implementations of
224       back-tracing to register themselves (at different times).
225    
226    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
227       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
228       It can be turned on using this call:
229         SMLofNJ.Internals.BTrace.mode (SOME true);
230       Turning it off again:
231         SMLofNJ.Internals.BTrace.mode (SOME false);
232       Querying the current status:
233         SMLofNJ.Internals.BTrace.mode NONE;
234       Annotated programs are about twice as big as normal ones, and they
235       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
236       where all hooks do nothing).  The slowdown with a plugin that is
237       actually useful (such as the one supplied by default) is even greater,
238       but in the case of the default plugin it is still only an constant
239       factor (amortized).
240    
241    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
242       with a sub-structure BTrace for controlling back-tracing.  In particular,
243       the above-mentioned function "mode" controls whether the annotation
244       phase is invoked by the compiler.  Another important function is
245       "trigger": when called it aborts the current execution and causes
246       the top-level loop to print a full back-trace.
247    
248    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
249       for back-tracing.  It keeps track of the dynamic call stack and in
250       addition to that it keeps a partial history at each "level" of that
251       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
252       d and b (at separate times, dynamically), then the report will show:
253    
254       GOTO   d
255             /c
256       GOTO  \b
257       CALL   a
258    
259       This shows that there was an initial non-tail call of a, then a
260       tail-call to b or c, looping behavior in a cluster of functions that
261       consist of b and c, and then a goto from that cluster (i.e., either from
262       b or from c) to d.
263    
264       Note that (depending on the user program) the amount of information
265       that the back-trace module has to keep track of at each level is bounded
266       by a constant.  Thus, the whole implementation has the same asymptotical
267       complexity as the original program (both in space and in time).
268    
269    5. compiler/TopLevel/interact/evalloop.sml has been modified to
270       handle the special exception SMLofNJ.Internals.BTrace.BTrace
271       which is raised by the "trigger" function mentioned above.
272    
273    Notes on usage:
274    
275    - Annotated code works well together with unannotated code:
276    Unannotated calls simply do not show up at all in the backtrace.
277    
278    - It is not a good idea to let modules that were annotated during
279    different sessions run at the same time.  This is because the compiler
280    chooses small integers to identify individual functions, and there
281    will be clashes if different modules were compiled in separate sessions.
282    (Nothing will crash, and you will even be told about the clashes, but
283    back-trace information will in general not be useful.)
284    
285    - Back-tracing can be confused by callcc and capture.
286    
287    - The only way of getting a back-trace right now is to explicitly
288    invoke the "trigger" function from your user program.  Eventually, we
289    should make every exception carry back-trace information (if
290    available).  But since this creates more overhead at "raise"-time
291    (similar to the current exnHistory overhead), I have not yet
292    implemented this.  (The implementation will be rather easy.)  With
293    exceptions carrying back-trace information, this facility will be even
294    more useful because users don't need to modify their programs...
295    
296    - While it is possible to compile the compiler with back-trace
297    annotations turned on (I did it to get some confidence in
298    correctness), you must make absolutely sure that core.sml and
299    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
300    be compiled with annotation because there is no core access yet, but
301    if you compile btimp.sml with annotation, then the system will go into
302    an infinite recursion and crash.)
303    Since CM currently does not know about BTrace, the only way to turn
304    annotations on and off for different modules of the compiler is to
305    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
306    this is awkward and clumsy.
307    
308    Sample sessions:
309    
310    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
311    - SMLofNJ.Internals.BTrace.mode (SOME true);
312    [autoloading]
313    [autoloading done]
314    val it = false : bool
315    - structure X = struct
316    -     fun main n = let
317    -         fun a (x, 0) = d x
318    -           | a (x, n) = b (x, n - 1)
319    -         and b (x, n) = c (x, n)
320    -         and c (x, n) = a (x, n)
321    -         and d x = e (x, 3)
322    -         and e (x, 0) = f x
323    -           | e (x, n) = e (x, n - 1)
324    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
325    -           | f n = n * g (n - 1)
326    -         and g n = a (n, 3)
327    -     in
328    -         f n
329    -     end
330    - end;
331    structure X : sig val main : int -> int end
332    - X.main 3;
333    *** BACK-TRACE ***
334    GOTO   stdIn:4.2-13.20: X.main[2].f
335    GOTO-( stdIn:4.2-13.20: X.main[2].e
336    GOTO   stdIn:4.2-13.20: X.main[2].d
337         / stdIn:4.2-13.20: X.main[2].a
338         | stdIn:4.2-13.20: X.main[2].b
339    GOTO-\ stdIn:4.2-13.20: X.main[2].c
340    CALL   stdIn:4.2-13.20: X.main[2].g
341    GOTO   stdIn:4.2-13.20: X.main[2].f
342    GOTO-( stdIn:4.2-13.20: X.main[2].e
343    GOTO   stdIn:4.2-13.20: X.main[2].d
344         / stdIn:4.2-13.20: X.main[2].a
345         | stdIn:4.2-13.20: X.main[2].b
346    GOTO-\ stdIn:4.2-13.20: X.main[2].c
347    CALL   stdIn:4.2-13.20: X.main[2].g
348    GOTO   stdIn:4.2-13.20: X.main[2].f
349    GOTO-( stdIn:4.2-13.20: X.main[2].e
350    GOTO   stdIn:4.2-13.20: X.main[2].d
351         / stdIn:4.2-13.20: X.main[2].a
352         | stdIn:4.2-13.20: X.main[2].b
353    GOTO-\ stdIn:4.2-13.20: X.main[2].c
354    CALL   stdIn:4.2-13.20: X.main[2].g
355    GOTO   stdIn:4.2-13.20: X.main[2].f
356    CALL   stdIn:2.15-17.4: X.main[2]
357    -
358    
359    (Note that because of a FLINt bug the above code currently does not
360    compile without BTrace turned on.)
361    
362    Here is another example, using my modified Tiger compiler:
363    
364    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
365    - SMLofNJ.Internals.BTrace.mode (SOME true);
366    [autoloading]
367    [autoloading done]
368    val it = false : bool
369    - CM.make "sources.cm";
370    [autoloading]
371    ...
372    [autoloading done]
373    [scanning sources.cm]
374    [parsing (sources.cm):parse.sml]
375    [creating directory CM/SKEL ...]
376    [parsing (sources.cm):tiger.lex.sml]
377    ...
378    [wrote CM/sparc-unix/semant.sml]
379    [compiling (sources.cm):main.sml]
380    [wrote CM/sparc-unix/main.sml]
381    [New bindings added.]
382    val it = true : bool
383    - Main.compile ("../testcases/merge.tig", "foo.out");
384    *** BACK-TRACE ***
385    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
386    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
387    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
388    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
389    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
390    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
391    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
392         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
393    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
394    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
395    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
396    CALL   main.sml:1.18-118.4: Main.compile[2]
397    -
398    
399    ----------------------------------------------------------------------
400    Name: Matthias Blumen
401    Date: 2000/06/21 18:00:00 JST
402    Tag: blume-20000621-manual
403    Description:
404    
405    CM manual update: Path environments documented.
406    
407    ----------------------------------------------------------------------
408    Name: Matthias Blume
409    Date: 2000/06/19 13:40:00
410    Tag: blume-20000619-manual
411    Description:
412    
413    CM manual and system/README update.  This only covers the fact that
414    there are no more implicit anchors.  (Path environments and the "bind"
415    option to "cm" have yet to be documented.)
416    
417    ----------------------------------------------------------------------
418    Name: Matthias Blume
419    Date: 2000/06/19 11:05:00 JST
420    Tag: blume-20000619-chdir-bugfix
421    Description:
422    
423    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
424    
425    ----------------------------------------------------------------------
426    Name: Matthias Blume
427  Date: 2000/06/18 22:00:10 JST  Date: 2000/06/18 22:00:10 JST
428  Tag: blume-20000618-implicit-anchors-really-gone  Tag: blume-20000618-implicit-anchors-really-gone
429  Description:  Description:

Legend:
Removed from v.670  
changed lines
  Added in v.690

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0