Move to kernel style SPDX license identifiers
[lttng-ust.git] / liblttng-ust-dl / ust_dl.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 */
7
8 #undef TRACEPOINT_PROVIDER
9 #define TRACEPOINT_PROVIDER lttng_ust_dl
10
11 #if !defined(_TRACEPOINT_UST_DL_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
12 #define _TRACEPOINT_UST_DL_H
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 #include <stddef.h>
19 #include <stdint.h>
20 #include <unistd.h>
21
22 #define LTTNG_UST_DL_PROVIDER
23 #include <lttng/tracepoint.h>
24
25 TRACEPOINT_EVENT(lttng_ust_dl, dlopen,
26 TP_ARGS(void *, ip, void *, baddr, const char *, path,
27 int, flags, uint64_t, memsz, uint8_t, has_build_id,
28 uint8_t, has_debug_link),
29 TP_FIELDS(
30 ctf_integer_hex(void *, baddr, baddr)
31 ctf_integer(uint64_t, memsz, memsz)
32 ctf_integer_hex(int, flags, flags)
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 #ifdef HAVE_DLMOPEN
40 TRACEPOINT_EVENT(lttng_ust_dl, dlmopen,
41 TP_ARGS(void *, ip, void *, baddr, Lmid_t, nsid,
42 const char *, path, int, flags,
43 uint64_t, memsz, uint8_t, has_build_id,
44 uint8_t, has_debug_link),
45 TP_FIELDS(
46 ctf_integer_hex(void *, baddr, baddr)
47 ctf_integer(uint64_t, memsz, memsz)
48 ctf_integer(Lmid_t, nsid, nsid)
49 ctf_integer_hex(int, flags, flags)
50 ctf_string(path, path)
51 ctf_integer(uint8_t, has_build_id, has_build_id)
52 ctf_integer(uint8_t, has_debug_link, has_debug_link)
53 )
54 )
55 #endif
56
57 TRACEPOINT_EVENT(lttng_ust_dl, build_id,
58 TP_ARGS(
59 void *, ip,
60 void *, baddr,
61 uint8_t *, build_id,
62 size_t, build_id_len
63 ),
64 TP_FIELDS(
65 ctf_integer_hex(void *, baddr, baddr)
66 ctf_sequence_hex(uint8_t, build_id, build_id,
67 size_t, build_id_len)
68 )
69 )
70
71 TRACEPOINT_EVENT(lttng_ust_dl, debug_link,
72 TP_ARGS(
73 void *, ip,
74 void *, baddr,
75 char *, filename,
76 uint32_t, crc
77 ),
78 TP_FIELDS(
79 ctf_integer_hex(void *, baddr, baddr)
80 ctf_integer(uint32_t, crc, crc)
81 ctf_string(filename, filename)
82 )
83 )
84
85 TRACEPOINT_EVENT(lttng_ust_dl, dlclose,
86 TP_ARGS(void *, ip, void *, baddr),
87 TP_FIELDS(
88 ctf_integer_hex(void *, baddr, baddr)
89 )
90 )
91
92 #endif /* _TRACEPOINT_UST_DL_H */
93
94 #undef TRACEPOINT_INCLUDE
95 #define TRACEPOINT_INCLUDE "./ust_dl.h"
96
97 /* This part must be outside ifdef protection */
98 #include <lttng/tracepoint-event.h>
99
100 #ifdef __cplusplus
101 }
102 #endif
This page took 0.030416 seconds and 4 git commands to generate.