625a75237255f6879899706735d0e6b9e4184e38
[lttng-docs.git] / contents / using-lttng / instrumenting / prebuilt-ust-helpers / liblttng-ust-dl.md
1 ---
2 id: liblttng-ust-dl
3 since: 2.4
4 ---
5
6 This LTTng-UST helper causes all calls to `dlopen()` and `dlclose()`
7 in the target application to be traced with LTTng.
8
9 The helper's shared object, `liblttng-ust-dl.so`, registers the
10 following tracepoints when preloaded:
11
12 <div class="table">
13 <table class="func-desc">
14 <thead>
15 <tr>
16 <th><abbr title="Tracepoint">TP</abbr> provider name</th>
17 <th><abbr title="Tracepoint">TP</abbr> name</th>
18 <th>Description/fields</th>
19 </tr>
20 </thead>
21 <tbody>
22 <tr>
23 <td rowspan="2">
24 <code class="no-bg">lttng_ust_dl</code>
25 </td>
26 <td>
27 <code class="no-bg">dlopen</code>
28 </td>
29 <td>
30 <p><code>dlopen()</code> call</p>
31
32 <ul>
33 <li>
34 <code class="arg">baddr</code>&nbsp;memory
35 base address
36 (where the dynamic linker placed the shared
37 object)
38 </li>
39 <li>
40 <code class="arg">sopath</code>&nbsp;file system
41 path to the loaded shared object
42 </li>
43 <li>
44 <code class="arg">size</code>&nbsp;file size
45 of the the loaded shared object
46 </li>
47 <li>
48 <code class="arg">mtime</code>&nbsp;last
49 modification time (seconds since Epoch time)
50 of the loaded shared object
51 </li>
52 </ul>
53 </td>
54 </tr>
55 <tr>
56 <td>
57 <code class="no-bg">dlclose</code>
58 </td>
59 <td>
60 <p><code>dlclose()</code> call</p>
61
62 <ul>
63 <li>
64 <code class="arg">baddr</code>&nbsp;memory
65 base address
66 </li>
67 </ul>
68 </td>
69 </tr>
70 </tbody>
71 </table>
72 </div>
73
74 To use this LTTng-UST helper with any user application, independently of
75 how the latter is built, do:
76
77 <pre class="term">
78 LD_PRELOAD=liblttng-ust-dl.so my-app
79 </pre>
80
81 Of course, like any other tracepoint, the ones above need to be enabled
82 in order for LTTng-UST to generate events. This is done using the
83 `lttng` command line tool
84 (see [Controlling tracing](#doc-controlling-tracing)).
This page took 0.031182 seconds and 3 git commands to generate.