Commit | Line | Data |
---|---|---|
b13d93c2 | 1 | #undef TRACEPOINT_PROVIDER |
6d4658aa | 2 | #define TRACEPOINT_PROVIDER lttng_ust_dl |
b13d93c2 | 3 | |
6d4658aa AB |
4 | #if !defined(_TRACEPOINT_UST_DL_H) || defined(TRACEPOINT_HEADER_MULTI_READ) |
5 | #define _TRACEPOINT_UST_DL_H | |
b13d93c2 PW |
6 | |
7 | #ifdef __cplusplus | |
8 | extern "C" { | |
9 | #endif | |
10 | ||
11 | /* | |
12 | * Copyright (C) 2013 Paul Woegerer <paul_woegerer@mentor.com> | |
8e2aed3f | 13 | * Copyright (C) 2015 Antoine Busque <abusque@efficios.com> |
b13d93c2 PW |
14 | * |
15 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
16 | * of this software and associated documentation files (the "Software"), to deal | |
17 | * in the Software without restriction, including without limitation the rights | |
18 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
19 | * copies of the Software, and to permit persons to whom the Software is | |
20 | * furnished to do so, subject to the following conditions: | |
21 | * | |
22 | * The above copyright notice and this permission notice shall be included in | |
23 | * all copies or substantial portions of the Software. | |
24 | * | |
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
26 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
27 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
28 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
29 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
30 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
31 | * SOFTWARE. | |
32 | */ | |
33 | ||
b4051ad8 | 34 | #include <stddef.h> |
b13d93c2 PW |
35 | #include <stdint.h> |
36 | #include <unistd.h> | |
0b2253f5 | 37 | #include <config.h> |
b13d93c2 | 38 | |
6d4658aa | 39 | #define LTTNG_UST_DL_PROVIDER |
b13d93c2 PW |
40 | #include <lttng/tracepoint.h> |
41 | ||
6d4658aa | 42 | TRACEPOINT_EVENT(lttng_ust_dl, dlopen, |
7b0fdd83 MD |
43 | TP_ARGS(void *, ip, void *, baddr, const char *, path, |
44 | int, flags, uint64_t, memsz, uint8_t, has_build_id, | |
45 | uint8_t, has_debug_link), | |
46 | TP_FIELDS( | |
47 | ctf_integer_hex(void *, baddr, baddr) | |
48 | ctf_integer(uint64_t, memsz, memsz) | |
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 | ||
42330adc | 56 | #ifdef HAVE_DLMOPEN |
7b0fdd83 MD |
57 | TRACEPOINT_EVENT(lttng_ust_dl, dlmopen, |
58 | TP_ARGS(void *, ip, void *, baddr, Lmid_t, nsid, | |
59 | const char *, path, int, flags, | |
c5c4fd82 MD |
60 | uint64_t, memsz, uint8_t, has_build_id, |
61 | uint8_t, has_debug_link), | |
b13d93c2 PW |
62 | TP_FIELDS( |
63 | ctf_integer_hex(void *, baddr, baddr) | |
8e2aed3f | 64 | ctf_integer(uint64_t, memsz, memsz) |
7b0fdd83 MD |
65 | ctf_integer(Lmid_t, nsid, nsid) |
66 | ctf_integer_hex(int, flags, flags) | |
f60e49df | 67 | ctf_string(path, path) |
c5c4fd82 MD |
68 | ctf_integer(uint8_t, has_build_id, has_build_id) |
69 | ctf_integer(uint8_t, has_debug_link, has_debug_link) | |
8e2aed3f AB |
70 | ) |
71 | ) | |
42330adc | 72 | #endif |
8e2aed3f AB |
73 | |
74 | TRACEPOINT_EVENT(lttng_ust_dl, build_id, | |
75 | TP_ARGS( | |
76 | void *, ip, | |
77 | void *, baddr, | |
78 | uint8_t *, build_id, | |
79 | size_t, build_id_len | |
80 | ), | |
81 | TP_FIELDS( | |
82 | ctf_integer_hex(void *, baddr, baddr) | |
83 | ctf_sequence_hex(uint8_t, build_id, build_id, | |
84 | size_t, build_id_len) | |
85 | ) | |
86 | ) | |
87 | ||
88 | TRACEPOINT_EVENT(lttng_ust_dl, debug_link, | |
89 | TP_ARGS( | |
90 | void *, ip, | |
91 | void *, baddr, | |
92 | char *, filename, | |
93 | uint32_t, crc | |
94 | ), | |
95 | TP_FIELDS( | |
96 | ctf_integer_hex(void *, baddr, baddr) | |
97 | ctf_integer(uint32_t, crc, crc) | |
98 | ctf_string(filename, filename) | |
b13d93c2 PW |
99 | ) |
100 | ) | |
101 | ||
6d4658aa | 102 | TRACEPOINT_EVENT(lttng_ust_dl, dlclose, |
8e2aed3f | 103 | TP_ARGS(void *, ip, void *, baddr), |
b13d93c2 PW |
104 | TP_FIELDS( |
105 | ctf_integer_hex(void *, baddr, baddr) | |
106 | ) | |
107 | ) | |
108 | ||
6d4658aa | 109 | #endif /* _TRACEPOINT_UST_DL_H */ |
b13d93c2 PW |
110 | |
111 | #undef TRACEPOINT_INCLUDE | |
6d4658aa | 112 | #define TRACEPOINT_INCLUDE "./ust_dl.h" |
b13d93c2 PW |
113 | |
114 | /* This part must be outside ifdef protection */ | |
115 | #include <lttng/tracepoint-event.h> | |
116 | ||
117 | #ifdef __cplusplus | |
118 | } | |
119 | #endif |