Commit | Line | Data |
---|---|---|
c0c0989a MJ |
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 | ||
b13d93c2 | 8 | #undef TRACEPOINT_PROVIDER |
6d4658aa | 9 | #define TRACEPOINT_PROVIDER lttng_ust_dl |
b13d93c2 | 10 | |
6d4658aa AB |
11 | #if !defined(_TRACEPOINT_UST_DL_H) || defined(TRACEPOINT_HEADER_MULTI_READ) |
12 | #define _TRACEPOINT_UST_DL_H | |
b13d93c2 PW |
13 | |
14 | #ifdef __cplusplus | |
15 | extern "C" { | |
16 | #endif | |
17 | ||
b4051ad8 | 18 | #include <stddef.h> |
b13d93c2 PW |
19 | #include <stdint.h> |
20 | #include <unistd.h> | |
21 | ||
6d4658aa | 22 | #define LTTNG_UST_DL_PROVIDER |
b13d93c2 PW |
23 | #include <lttng/tracepoint.h> |
24 | ||
6d4658aa | 25 | TRACEPOINT_EVENT(lttng_ust_dl, dlopen, |
cadfcbfc | 26 | LTTNG_UST_TP_ARGS(void *, ip, void *, baddr, const char *, path, |
7b0fdd83 MD |
27 | int, flags, uint64_t, memsz, uint8_t, has_build_id, |
28 | uint8_t, has_debug_link), | |
29 | TP_FIELDS( | |
5152f6df | 30 | ctf_unused(ip) |
7b0fdd83 MD |
31 | ctf_integer_hex(void *, baddr, baddr) |
32 | ctf_integer(uint64_t, memsz, memsz) | |
33 | ctf_integer_hex(int, flags, flags) | |
34 | ctf_string(path, path) | |
35 | ctf_integer(uint8_t, has_build_id, has_build_id) | |
36 | ctf_integer(uint8_t, has_debug_link, has_debug_link) | |
37 | ) | |
38 | ) | |
39 | ||
42330adc | 40 | #ifdef HAVE_DLMOPEN |
7b0fdd83 | 41 | TRACEPOINT_EVENT(lttng_ust_dl, dlmopen, |
cadfcbfc | 42 | LTTNG_UST_TP_ARGS(void *, ip, void *, baddr, Lmid_t, nsid, |
7b0fdd83 | 43 | const char *, path, int, flags, |
c5c4fd82 MD |
44 | uint64_t, memsz, uint8_t, has_build_id, |
45 | uint8_t, has_debug_link), | |
b13d93c2 | 46 | TP_FIELDS( |
5152f6df | 47 | ctf_unused(ip) |
b13d93c2 | 48 | ctf_integer_hex(void *, baddr, baddr) |
8e2aed3f | 49 | ctf_integer(uint64_t, memsz, memsz) |
7b0fdd83 MD |
50 | ctf_integer(Lmid_t, nsid, nsid) |
51 | ctf_integer_hex(int, flags, flags) | |
f60e49df | 52 | ctf_string(path, path) |
c5c4fd82 MD |
53 | ctf_integer(uint8_t, has_build_id, has_build_id) |
54 | ctf_integer(uint8_t, has_debug_link, has_debug_link) | |
8e2aed3f AB |
55 | ) |
56 | ) | |
42330adc | 57 | #endif |
8e2aed3f AB |
58 | |
59 | TRACEPOINT_EVENT(lttng_ust_dl, build_id, | |
cadfcbfc | 60 | LTTNG_UST_TP_ARGS( |
8e2aed3f AB |
61 | void *, ip, |
62 | void *, baddr, | |
63 | uint8_t *, build_id, | |
64 | size_t, build_id_len | |
65 | ), | |
66 | TP_FIELDS( | |
5152f6df | 67 | ctf_unused(ip) |
8e2aed3f AB |
68 | ctf_integer_hex(void *, baddr, baddr) |
69 | ctf_sequence_hex(uint8_t, build_id, build_id, | |
70 | size_t, build_id_len) | |
71 | ) | |
72 | ) | |
73 | ||
74 | TRACEPOINT_EVENT(lttng_ust_dl, debug_link, | |
cadfcbfc | 75 | LTTNG_UST_TP_ARGS( |
8e2aed3f AB |
76 | void *, ip, |
77 | void *, baddr, | |
78 | char *, filename, | |
79 | uint32_t, crc | |
80 | ), | |
81 | TP_FIELDS( | |
5152f6df | 82 | ctf_unused(ip) |
8e2aed3f AB |
83 | ctf_integer_hex(void *, baddr, baddr) |
84 | ctf_integer(uint32_t, crc, crc) | |
85 | ctf_string(filename, filename) | |
b13d93c2 PW |
86 | ) |
87 | ) | |
88 | ||
6d4658aa | 89 | TRACEPOINT_EVENT(lttng_ust_dl, dlclose, |
cadfcbfc | 90 | LTTNG_UST_TP_ARGS(void *, ip, void *, baddr), |
b13d93c2 | 91 | TP_FIELDS( |
5152f6df | 92 | ctf_unused(ip) |
b13d93c2 PW |
93 | ctf_integer_hex(void *, baddr, baddr) |
94 | ) | |
95 | ) | |
96 | ||
6d4658aa | 97 | #endif /* _TRACEPOINT_UST_DL_H */ |
b13d93c2 PW |
98 | |
99 | #undef TRACEPOINT_INCLUDE | |
6d4658aa | 100 | #define TRACEPOINT_INCLUDE "./ust_dl.h" |
b13d93c2 PW |
101 | |
102 | /* This part must be outside ifdef protection */ | |
103 | #include <lttng/tracepoint-event.h> | |
104 | ||
105 | #ifdef __cplusplus | |
106 | } | |
107 | #endif |