Move to kernel style SPDX license identifiers
[lttng-ust.git] / liblttng-ust / ust_lib.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2013 Paul Woegerer <paul_woegerer@mentor.com>
5 * Copyright (C) 2015 Antoine Busque <abusque@efficios.com>
6 * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 */
8
9 #undef TRACEPOINT_PROVIDER
10 #define TRACEPOINT_PROVIDER lttng_ust_lib
11
12 #if !defined(_TRACEPOINT_UST_LIB_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
13 #define _TRACEPOINT_UST_LIB_H
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 #include <stddef.h>
20 #include <stdint.h>
21 #include <unistd.h>
22
23 #define LTTNG_UST_LIB_PROVIDER
24 #include <lttng/tracepoint.h>
25
26 TRACEPOINT_EVENT(lttng_ust_lib, load,
27 TP_ARGS(void *, ip, void *, baddr, const char*, path,
28 uint64_t, memsz, uint8_t, has_build_id,
29 uint8_t, has_debug_link),
30 TP_FIELDS(
31 ctf_integer_hex(void *, baddr, baddr)
32 ctf_integer(uint64_t, memsz, memsz)
33 ctf_string(path, path)
34 ctf_integer(uint8_t, has_build_id, has_build_id)
35 ctf_integer(uint8_t, has_debug_link, has_debug_link)
36 )
37 )
38
39 TRACEPOINT_EVENT(lttng_ust_lib, build_id,
40 TP_ARGS(
41 void *, ip,
42 void *, baddr,
43 uint8_t *, build_id,
44 size_t, build_id_len
45 ),
46 TP_FIELDS(
47 ctf_integer_hex(void *, baddr, baddr)
48 ctf_sequence_hex(uint8_t, build_id, build_id,
49 size_t, build_id_len)
50 )
51 )
52
53 TRACEPOINT_EVENT(lttng_ust_lib, debug_link,
54 TP_ARGS(
55 void *, ip,
56 void *, baddr,
57 char *, filename,
58 uint32_t, crc
59 ),
60 TP_FIELDS(
61 ctf_integer_hex(void *, baddr, baddr)
62 ctf_integer(uint32_t, crc, crc)
63 ctf_string(filename, filename)
64 )
65 )
66
67 TRACEPOINT_EVENT(lttng_ust_lib, unload,
68 TP_ARGS(void *, ip, void *, baddr),
69 TP_FIELDS(
70 ctf_integer_hex(void *, baddr, baddr)
71 )
72 )
73
74 #endif /* _TRACEPOINT_UST_LIB_H */
75
76 #undef TRACEPOINT_INCLUDE
77 #define TRACEPOINT_INCLUDE "./ust_lib.h"
78
79 /* This part must be outside ifdef protection */
80 #include <lttng/tracepoint-event.h>
81
82 #ifdef __cplusplus
83 }
84 #endif
This page took 0.030231 seconds and 4 git commands to generate.