Commit | Line | Data |
---|---|---|
5e0cbfb0 PP |
1 | --- |
2 | id: liblttng‑ust‑dl | |
86384750 | 3 | since: 2.4 |
5e0cbfb0 PP |
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 | ||
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"> | |
1ad5c0f7 | 24 | <code class="no-bg">lttng_ust_dl</code> |
5e0cbfb0 PP |
25 | </td> |
26 | <td> | |
1ad5c0f7 | 27 | <code class="no-bg">dlopen</code> |
5e0cbfb0 PP |
28 | </td> |
29 | <td> | |
30 | <p><code>dlopen()</code> call</p> | |
31 | ||
32 | <ul> | |
33 | <li> | |
34 | <code class="arg">baddr</code> memory | |
35 | base address | |
36 | (where the dynamic linker placed the shared | |
37 | object) | |
38 | </li> | |
39 | <li> | |
40 | <code class="arg">sopath</code> file system | |
41 | path to the loaded shared object | |
42 | </li> | |
43 | <li> | |
44 | <code class="arg">size</code> file size | |
45 | of the the loaded shared object | |
46 | </li> | |
47 | <li> | |
48 | <code class="arg">mtime</code> 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> | |
1ad5c0f7 | 57 | <code class="no-bg">dlclose</code> |
5e0cbfb0 PP |
58 | </td> |
59 | <td> | |
60 | <p><code>dlclose()</code> call</p> | |
61 | ||
62 | <ul> | |
63 | <li> | |
64 | <code class="arg">baddr</code> memory | |
65 | base address | |
66 | </li> | |
67 | </ul> | |
68 | </td> | |
69 | </tr> | |
70 | </tbody> | |
71 | </table> | |
f6875860 | 72 | </div> |
5e0cbfb0 PP |
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)). |