Commit | Line | Data |
---|---|---|
53f7d0d7 MJ |
1 | // SPDX-FileCopyrightText: 2016 Philippe Proulx <pproulx@efficios.com> |
2 | // SPDX-License-Identifier: CC-BY-4.0 | |
3 | // | |
4ddbd0b7 PP |
4 | lttng-ust-dl(3) |
5 | =============== | |
6 | :object-type: library | |
7 | ||
8 | ||
9 | NAME | |
10 | ---- | |
11 | lttng-ust-dl - Dynamic linker tracing (LTTng-UST helper) | |
12 | ||
13 | ||
14 | SYNOPSIS | |
15 | -------- | |
16 | Launch your application by preloading `liblttng-ust-dl.so`: | |
17 | ||
18 | [role="term"] | |
19 | [verse] | |
636cf2a0 | 20 | $ *LD_PRELOAD=liblttng-ust-dl.so* my-app |
4ddbd0b7 PP |
21 | |
22 | ||
23 | DESCRIPTION | |
24 | ----------- | |
25 | When the `liblttng-ust-dl.so` library is preloaded before a given | |
26 | application starts, it causes all calls to man:dlopen(3) and | |
27 | man:dlclose(3) in said application to be traced with LTTng-UST (see | |
28 | man:lttng-ust(3)). | |
29 | ||
30 | See man:lttng(1) to learn more about how to control LTTng tracing | |
31 | sessions. | |
32 | ||
d1194248 PP |
33 | IMPORTANT: This LTTng-UST helper can also emit _shared library |
34 | load/unload_ events (see _Shared library load/unload tracking_ in | |
35 | man:lttng-ust(3)). You should :not: use the event records generated by | |
36 | this LTTng-UST helper (prefixed with `lttng_ust_dl:`) to track the | |
37 | loading and unloading of shared libraries, especially in situations | |
38 | where a dynamically loaded library loads its own dependencies. Instead, | |
39 | do preload `liblttng-ust-dl.so`, but use the shared library load/unload | |
40 | event records, which are more reliable, for your tracking analysis. | |
41 | ||
42 | The following LTTng-UST events are available when using this library. | |
43 | ||
4ddbd0b7 PP |
44 | |
45 | `lttng_ust_dl:dlopen`:: | |
46 | Emitted when man:dlopen(3) is called. | |
47 | + | |
48 | Fields: | |
49 | + | |
50 | [options="header"] | |
8902dadc PP |
51 | |=== |
52 | |Field name |Description | |
53 | ||
54 | |`baddr` | |
d01f365a | 55 | |Base address of loaded library. |
8902dadc PP |
56 | |
57 | |`memsz` | |
d01f365a | 58 | |Size of loaded library in memory. |
8902dadc | 59 | |
3faa376c PP |
60 | |`flags` |
61 | |Flags passed to man:dlopen(3). | |
62 | ||
63 | |`path` | |
64 | |Path to loaded library file. | |
65 | ||
66 | |`has_build_id` | |
67 | |Whether or not the loaded library has a build ID. If this field is 1, | |
68 | you can expect that an `lttng_ust_dl:build_id` event record | |
69 | follows this one (not necessarily immediately after). | |
70 | ||
71 | |`has_debug_link` | |
72 | |Whether or not the loaded library has debug link information. If this | |
73 | field is 1, you can expect that an `lttng_ust_dl:debug_link` event | |
74 | record follows this one (not necessarily immediately after). | |
75 | |=== | |
76 | ||
77 | `lttng_ust_dl:dlmopen`:: | |
78 | Emitted when man:dlmopen(3) is called. | |
79 | + | |
80 | Fields: | |
81 | + | |
82 | [options="header"] | |
83 | |=== | |
84 | |Field name |Description | |
85 | ||
86 | |`baddr` | |
87 | |Base address of loaded library. | |
88 | ||
89 | |`memsz` | |
90 | |Size of loaded library in memory. | |
91 | ||
92 | |`nsid` | |
93 | |ID of the namespace in which the library is loaded (as passed | |
94 | to man:dlmopen(3)). | |
95 | ||
96 | |`flags` | |
97 | |Flags passed to man:dlmopen(3). | |
98 | ||
8902dadc | 99 | |`path` |
d01f365a | 100 | |Path to loaded library file. |
3faa376c PP |
101 | |
102 | |`has_build_id` | |
103 | |Whether or not the loaded library has a build ID. If this field is 1, | |
104 | you can expect that an `lttng_ust_dl:build_id` event record | |
105 | follows this one (not necessarily immediately after). | |
106 | ||
107 | |`has_debug_link` | |
108 | |Whether or not the loaded library has debug link information. If this | |
109 | field is 1, you can expect that an `lttng_ust_dl:debug_link` event | |
110 | record follows this one (not necessarily immediately after). | |
8902dadc | 111 | |=== |
4ddbd0b7 PP |
112 | |
113 | `lttng_ust_dl:dlclose`:: | |
114 | Emitted when man:dlclose(3) is called. | |
115 | + | |
116 | Fields: | |
117 | + | |
118 | [options="header"] | |
8902dadc PP |
119 | |=== |
120 | |Field name |Description | |
121 | ||
122 | |`baddr` | |
d01f365a | 123 | |Base address of loaded library. |
8902dadc | 124 | |=== |
4ddbd0b7 PP |
125 | |
126 | `lttng_ust_dl:debug_link`:: | |
127 | Emitted when debug link information is found when loading a library | |
128 | with man:dlopen(3). See | |
129 | https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html[Debugging Information in Separate Files] | |
130 | for more information about debug links. | |
131 | + | |
132 | Fields: | |
133 | + | |
134 | [options="header"] | |
8902dadc PP |
135 | |=== |
136 | |Field name |Description | |
137 | ||
138 | |`baddr` | |
d01f365a | 139 | |Base address of loaded library. |
8902dadc PP |
140 | |
141 | |`filename` | |
d01f365a | 142 | |Debug link file name. |
8902dadc PP |
143 | |
144 | |`crc` | |
d01f365a | 145 | |Debug link file's CRC. |
8902dadc | 146 | |=== |
4ddbd0b7 PP |
147 | |
148 | `lttng_ust_dl:build_id`:: | |
149 | Emitted when a build ID is found when loading a library | |
150 | with man:dlopen(3). See | |
151 | https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html[Debugging Information in Separate Files] | |
152 | for more information about build IDs. | |
153 | + | |
154 | Fields: | |
155 | + | |
156 | [options="header"] | |
8902dadc PP |
157 | |=== |
158 | |Field name |Description | |
159 | ||
160 | |`baddr` | |
d01f365a | 161 | |Base address of loaded library. |
8902dadc PP |
162 | |
163 | |`build_id` | |
d01f365a | 164 | |Build ID. |
8902dadc | 165 | |=== |
4ddbd0b7 PP |
166 | |
167 | ||
168 | include::common-footer.txt[] | |
169 | ||
170 | include::common-copyrights.txt[] | |
171 | ||
172 | include::common-authors.txt[] | |
173 | ||
174 | ||
175 | SEE ALSO | |
176 | -------- | |
177 | man:lttng-ust(3), | |
178 | man:dlopen(3), | |
179 | man:lttng(1) |