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