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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/c-libs/smlnj-bytecode/trace.c
ViewVC logotype

Annotation of /sml/trunk/src/runtime/c-libs/smlnj-bytecode/trace.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download) (as text)

1 : monnier 2 /* trace.c
2 :     *
3 :     * COPYRIGHT (c) 1994 by AT&T Bell Laboratories.
4 :     *
5 :     * Trace facility for the bytecode interpreter.
6 :     */
7 :    
8 :     #include "ml-base.h"
9 :     #include "ml-values.h"
10 :    
11 :     #ifdef TARGET_BYTECODE
12 :     # include "memory-trace.h"
13 :     #endif
14 :    
15 :     #ifdef INSTR_TRACE
16 :     extern bool_t traceOn;
17 :     #endif
18 :    
19 :     #ifdef FULL_HIST
20 :     extern bool_t fullHistOn;
21 :     #endif
22 :    
23 :     /* ml_start_trace:
24 :     */
25 :     ml_val_t ml_start_trace (ml_state_t *msp, ml_val_t *arg)
26 :     {
27 :     #if defined(TARGET_BYTECODE)
28 :     #ifdef FULL_HIST
29 :     if (fullHistOn == FALSE) printf("*** TURNING FULL_HIST ON ***\n");
30 :     else printf("*** START\n");
31 :     fullHistOn = TRUE;
32 :     #endif
33 :     #ifdef INSTR_TRACE
34 :     traceOn = TRUE;
35 :     #endif
36 :     #ifdef DO_MEMORY_TRACE
37 :     MemOp_Start (msp);
38 :     #endif
39 :     #endif
40 :    
41 :     } /* end of ml_start_trace */
42 :    
43 :     /* ml_stop_trace:
44 :     */
45 :     ml_val_t ml_stop_trace (ml_state_t *msp, ml_val_t *arg)
46 :     {
47 :     #if defined(TARGET_BYTECODE)
48 :     #ifdef INSTR_TRACE
49 :     traceOn = FALSE;
50 :     #endif
51 :     #ifdef DO_MEMORY_TRACE
52 :     MemOp_Stop (msp);
53 :     #endif
54 :     #endif
55 :    
56 :     } /* end of ml_stop_trace */
57 :    

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