Add sinces
[lttng-docs.git] / contents / using-lttng / instrumenting / prebuilt-ust-helpers / liblttng-ust-dl.md
CommitLineData
5e0cbfb0
PP
1---
2id: liblttng‑ust‑dl
86384750 3since: 2.4
5e0cbfb0
PP
4---
5
6This LTTng-UST helper causes all calls to `dlopen()` and `dlclose()`
7in the target application to be traced with LTTng.
8
9The helper's shared object, `liblttng-ust-dl.so`, registers the
10following tracepoints when preloaded:
11
f6875860 12<div class="table">
5e0cbfb0
PP
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">ust_baddr</code>
25 </td>
26 <td>
27 <code class="no-bg">push</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">pop</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>
f6875860 72</div>
5e0cbfb0
PP
73
74To use this LTTng-UST helper with any user application, independently of
75how the latter is built, do:
76
77<pre class="term">
78LD_PRELOAD=liblttng-ust-dl.so my-app
79</pre>
80
81Of course, like any other tracepoint, the ones above need to be enabled
82in 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.025733 seconds and 4 git commands to generate.