litl  0.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
fxt.h
Go to the documentation of this file.
1 /* -*- c-file-style: "GNU" -*- */
2 /*
3  * Copyright © Télécom SudParis.
4  * See COPYING in top-level directory.
5  */
6 
18 #ifndef FXT_H_
19 #define FXT_H_
20 
21 #include <string.h>
22 
23 #include "litl_types.h"
24 #include "litl_write.h"
25 #include "litl_read.h"
26 
28 
29 static fxt_t __trace;
30 
31 /* BEGIN -- Recording functions */
32 #define fut_setup(buffer_size, keymask, threadid) do { \
33  __trace = litl_write_init_trace(buffer_size); \
34  litl_write_pause_recording(__trace); \
35  }while(0)
36 
37 // finalizing traces
38 #define fut_endup(filename) do { \
39  litl_write_finalize_trace(__trace); \
40  }while(0)
41 #define fut_done(void) do { \
42  } while(0)
43 
44 #define fut_set_filename(filename) do { \
45  litl_write_set_filename(__trace, filename); \
46  litl_write_resume_recording(__trace); \
47  } while(0)
48 
49 #define enable_fut_flush() do { \
50  litl_write_buffer_flush_on(__trace); \
51  } while(0)
52 
53 #define disable_fut_flush() do { \
54  litl_write_buffer_flush_off(__trace); \
55  } while(0)
56 
57 #define fut_enable_tid_logging() do { \
58  litl_write_tid_recording_on(__trace); \
59  } while(0)
60 
61 #define fut_disable_tid_logging() do { \
62  litl_write_tid_recording_off(__trace); \
63  } while(0)
64 
65 /* END -- Recording functions */
66 
67 /* BEGIN -- Events */
68 #define FUT_DO_PROBE0(code) litl_write_probe_pack_0(__trace, code)
69 #define FUT_DO_PROBE1(code, arg1) litl_write_probe_pack_1(__trace, code, arg1)
70 #define FUT_DO_PROBE2(code, arg1, arg2) litl_write_probe_pack_2(__trace, code, arg1, arg2)
71 #define FUT_DO_PROBE3(code, arg1, arg2, arg3) litl_write_probe_pack_3(__trace, code, arg1, arg2, arg3)
72 #define FUT_DO_PROBE4(code, arg1, arg2, arg3, arg4) litl_write_probe_pack_4(__trace, code, arg1, arg2, arg3, arg4)
73 #define FUT_DO_PROBE5(code, arg1, arg2, arg3, arg4, arg5) litl_write_probe_pack_5(__trace, code, arg1, arg2, arg3, arg4, arg5)
74 #define FUT_DO_PROBE6(code, arg1, arg2, arg3, arg4, arg5, arg6) litl_write_probe_pack_6(__trace, code, arg1, arg2, arg3, arg4, arg5, arg6)
75 #define FUT_DO_PROBE(code, ...) litl_write_probe_pack_0(__trace, code)
76 #define FUT_DO_PROBESTR(code, str) litl_write_probe_raw(__trace, code, strlen(str), str)
77 
78 /* END -- Events */
79 
80 #endif /* FXT_H_ */
A data structure for recording events.
Definition: litl_types.h:304
litl_types Provides a set of data structures for recording and reading events as well as merging and ...
litl_read Provides a set of functions for reading events from a regular trace file or an archive of t...
litl_write_trace_t * fxt_t
Definition: fxt.h:27
litl_write Provides a set of functions for recording events in a trace file