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