06a5654a8803252df268d13effa0cf773a0cc05c
[babeltrace.git] / include / babeltrace / babeltrace-internal.h
1 #ifndef _BABELTRACE_INTERNAL_H
2 #define _BABELTRACE_INTERNAL_H
3
4 #include <stdio.h>
5 #include <glib.h>
6 #include <stdint.h>
7
8 extern int babeltrace_verbose, babeltrace_debug;
9
10 #define printf_verbose(fmt, args...) \
11 do { \
12 if (babeltrace_verbose) \
13 fprintf(stdout, "[verbose] " fmt, ## args); \
14 } while (0)
15
16 #define printf_debug(fmt, args...) \
17 do { \
18 if (babeltrace_debug) \
19 fprintf(stdout, "[debug] " fmt, ## args); \
20 } while (0)
21
22 #define likely(x) __builtin_expect(!!(x), 1)
23 #define unlikely(x) __builtin_expect(!!(x), 0)
24
25 struct trace_descriptor;
26 struct trace_collection {
27 GPtrArray *array; /* struct trace_descriptor */
28 GHashTable *clocks; /* struct ctf_clock */
29
30 uint64_t single_clock_offset_avg;
31 uint64_t offset_first;
32 int64_t delta_offset_first_sum;
33 int offset_nr;
34 };
35
36 extern int opt_all_field_names,
37 opt_scope_field_names,
38 opt_header_field_names,
39 opt_context_field_names,
40 opt_payload_field_names,
41 opt_all_fields,
42 opt_trace_field,
43 opt_trace_domain_field,
44 opt_trace_procname_field,
45 opt_trace_vpid_field,
46 opt_loglevel_field,
47 opt_delta_field,
48 opt_clock_raw,
49 opt_clock_seconds,
50 opt_clock_date,
51 opt_clock_gmt,
52 opt_clock_force_correlate;
53
54 extern uint64_t opt_clock_offset;
55
56 #endif
This page took 0.029298 seconds and 3 git commands to generate.