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 1645, Mon Oct 11 21:37:17 2004 UTC revision 1656, Wed Oct 20 20:05:45 2004 UTC
# Line 14  Line 14 
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16  Name: Matthias Blume (blume (at) tti - c (dot) org)  Name: Matthias Blume (blume (at) tti - c (dot) org)
17    Date: 2004/10/20 15:06:00 CDT
18    Tag: blume-20041020-standalone-backtrace
19    Description:
20    
21    Added a mechanism for getting back-trace information from standalone
22    programs.  Here is how it works:
23    
24       1. The part of the program from which you want to get backtrace
25          information (usually the whole program) should be wrapped with
26          BackTrace.monitor.  This is a (unit->'a)->'a function, and your
27          main program could be modified from something like
28    
29             fun main (pgm, args) = ...
30    
31         to
32    
33            fun main (pgm, args) = BackTrace.monitor (fn () => ...)
34    
35       2. To be able to access BackTrace.monitor, you have to add
36          library $smlnj-tdp/plugins.cm to the .cm file that contains your
37          main function.
38    
39       3. Remove all compiled code (i.e., all the .cm/ subdirectories that
40          CM might have created in the past for your project).
41    
42       4. Build the system using this command line:
43    
44             ml-build -Ctdp.instrument=true \$smlnj-tdp/back-trace.cm \
45                      myprog.cm MyProg.main myprog
46    
47          instead of the usual
48    
49             ml-build myprog.cm MyProg.main myprog
50    
51    I changed a library name:
52    
53       $/trace-debug-profile.cm --> $smlnj-tdp/plugins.cm
54    
55    New libraries:
56    
57       $smlnj-tdp/back-trace.cm
58          -- when loaded causes the back-trace plugin to be installed
59       $smlnj-tdp/coverage.cm
60          -- when loaded causes the coverage plugin to be installed
61    
62    ----------------------------------------------------------------------
63    Name: Matthias Blume (blume (at) tti - c (dot) org)
64    Date: 2004/10/18 16:45:00 CDT
65    Tag: blume-20041018-groupowner
66    Description:
67    
68    Added an "obsolete" warning for the "group owner" syntax to CM's parser.
69    
70    Eliminated group owner specs from .cm files throughout the source tree.
71    
72    ----------------------------------------------------------------------
73    Name: Matthias Blume (blume (at) tti - c (dot) org)
74    Date: 2004/10/15 15:45:00 CDT
75    Tag: blume-20041015-coverage
76    Description:
77    
78    * Test coverage tool added!
79    * Further reorganization of tracing-, debugging-, and profiling support:
80    
81        - moved original BTImp -- now called BackTrace -- into a separate
82          library called $/trace-debug-profile.cm
83        - eliminated all mentions of BTrace from SMLofNJ.Internals
84        - only the instrumentation mechanism is now left in the compiler proper
85        - BackTrace module is a plugin which is NOT plugged in by default
86        - Coverage module is another such plugin
87    
88    To get the benefits of any of these plugin modules, the code in
89    question must be compiled with tdp instrumentation turned on.  This
90    can be done by setting SMLofNJ.Internals.TDP.mode to true.
91    (The ref cell is also controlled via the -Ctdp.instrument=... switch.)
92    
93    Plugins are selected at link time.  (Pre-compiled instrumented code
94    can be re-loaded with different plugins in effect.)  When an
95    instrumented module is linked, whatever plugins are at that time
96    enabled will come into effect for that module.
97    
98    To enable the back-trace plugin, load library $/trace-debug-profile.cm
99    and invoke BackTrace.install() (e.g., from the interactive prompt).
100    To enable the coverage plugin, load the same library and invoke
101    Coverage.install().
102    
103    Back-traces are generated automatically on uncaught exceptions and
104    when the code in question explicitly invokes BackTrace.trigger().
105    
106    Coverage (and execution frequency-) information must be queried
107    explicitly by calling Coverage.not_covered and Coverage.hot_spots.
108    
109    ----------------------------------------------------------------------
110    Name: Matthias Blume (blume (at) tti - c (dot) org)
111    Date: 2004/10/14 17:40:00 CDT
112    Tag: blume-20041014-tdp-core
113    Description:
114    
115    Snapshot of a significant overhaul of how the trace/debug/profile support
116    is hooked into the system (specifically: Core and SMLofNJ.Internals).
117    
118    ----------------------------------------------------------------------
119    Name: Matthias Blume (blume (at) tti - c (dot) org)
120    Date: 2004/10/13 16:34:00 CDT
121    Tag: blume-20041013-tdp
122    Description:
123    
124    Some rationalization of names:
125    
126       structure BTrace -> structure TDPInstrument
127       etc.
128    
129    This is is preparation of using the original back-trace
130    instrumentation for other purposes.  "TDP" stands for
131    Trace/Debug/Profile.
132    
133    The control flag controlling whether instrumentation is on or off is now
134    registered under a different name, so instead of running sml as
135    
136     sml -Cinstrument.btrace-mode=true
137    
138    one has to say
139    
140     sml -Ctdp.instrument=true
141    
142    ----------------------------------------------------------------------
143    Name: Matthias Blume (blume (at) tti - c (dot) org)
144  Date: 2004/10/11 16:37:00 CDT  Date: 2004/10/11 16:37:00 CDT
145  Tag: blume-20041011-regions  Tag: blume-20041011-regions
146  Description:  Description:

Legend:
Removed from v.1645  
changed lines
  Added in v.1656

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