Add missing permission notice in each source file
[babeltrace.git] / include / babeltrace / babeltrace-internal.h
1 #ifndef _BABELTRACE_INTERNAL_H
2 #define _BABELTRACE_INTERNAL_H
3
4 /*
5 * babeltrace/babeltrace-internal.h
6 *
7 * Copyright 2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27 #include <stdio.h>
28 #include <glib.h>
29 #include <stdint.h>
30
31 extern int babeltrace_verbose, babeltrace_debug;
32
33 #define printf_verbose(fmt, args...) \
34 do { \
35 if (babeltrace_verbose) \
36 fprintf(stdout, "[verbose] " fmt, ## args); \
37 } while (0)
38
39 #define printf_debug(fmt, args...) \
40 do { \
41 if (babeltrace_debug) \
42 fprintf(stdout, "[debug] " fmt, ## args); \
43 } while (0)
44
45 #define likely(x) __builtin_expect(!!(x), 1)
46 #define unlikely(x) __builtin_expect(!!(x), 0)
47
48 struct trace_descriptor;
49 struct trace_collection {
50 GPtrArray *array; /* struct trace_descriptor */
51 GHashTable *clocks; /* struct ctf_clock */
52
53 uint64_t single_clock_offset_avg;
54 uint64_t offset_first;
55 int64_t delta_offset_first_sum;
56 int offset_nr;
57 int clock_use_offset_avg;
58 };
59
60 extern int opt_all_field_names,
61 opt_scope_field_names,
62 opt_header_field_names,
63 opt_context_field_names,
64 opt_payload_field_names,
65 opt_all_fields,
66 opt_trace_field,
67 opt_trace_domain_field,
68 opt_trace_procname_field,
69 opt_trace_vpid_field,
70 opt_trace_hostname_field,
71 opt_trace_default_fields,
72 opt_loglevel_field,
73 opt_emf_field,
74 opt_callsite_field,
75 opt_delta_field,
76 opt_clock_cycles,
77 opt_clock_seconds,
78 opt_clock_date,
79 opt_clock_gmt,
80 opt_clock_force_correlate;
81
82 extern uint64_t opt_clock_offset;
83
84 #endif
This page took 0.030452 seconds and 4 git commands to generate.