c924c2c6 |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 | <html> |
3 | <head> |
bc58079d |
4 | <title>Linux Trace Toolkit Next Generation User Documentation</title> |
c924c2c6 |
5 | </head> |
6 | <body> |
7 | |
bc58079d |
8 | <h1>Linux Trace Toolkit Next Generation User Documentation</h1> |
c924c2c6 |
9 | |
c924c2c6 |
10 | Author : Mathieu Desnoyers, September 2005<br> |
24070967 |
11 | Last update : January 21st, 2009<br> |
bc58079d |
12 | (originally known as the LTTng QUICKSTART guide) |
24070967 |
13 | |
14 | <h2>Table of Contents</h2> |
15 | <ul> |
16 | |
f9ff56f3 |
17 | <li><a href="#intro" name="TOCintro">Introduction</a></li> |
24070967 |
18 | <li><a href="#section1" name="TOCsection1">Installing LTTng and LTTV from |
6f88b01d |
19 | sources</a></li> |
38b04cd7 |
20 | <ul> |
2d540155 |
21 | <li><a href="#prerequisites" name="TOCprerequisites">Prerequisistes</li> |
22 | <li><a href="#getlttng" name="TOCgetlttng">Getting the LTTng packages</li> |
23 | <li><a href="#getlttngsrc" name="TOCgetlttngsrc">Getting the LTTng kernel sources</li> |
24 | <li><a href="#installlttng" name="TOCinstalllttng">Installing a LTTng kernel</li> |
6f88b01d |
25 | <li><a href="#editconfig" name="TOCeditconfig">Editing the system wide |
26 | configuration</a> |
27 | <li><a href="#getlttctl" name="TOCgetlttctl">Getting and installing the |
2d540155 |
28 | ltt-control package</li> |
29 | <li><a href="#userspacetracing" name="TOCuserspacetracing">Userspace Tracing</li> |
6f88b01d |
30 | <li><a href="#getlttv" name="TOCgetlttv">Getting and installing the LTTV package</ul> |
24070967 |
31 | <li><a href="#section2" name="TOCsection2">Using LTTng and LTTV</a></li> |
32 | <li><a href="#section3" name="TOCsection3">Adding kernel and user-space |
33 | tracepoints</a></li> |
633bc4a3 |
34 | <li><a href="#section4" name="TOCsection4">Creating Debian and RPM packages |
35 | from LTTV</a> |
c924c2c6 |
36 | |
f9ff56f3 |
37 | </ul> |
38 | |
39 | <hr /> |
40 | |
b9e1fab1 |
41 | <h2><a href="#TOCintro" name="intro">Introduction</a></h2> |
c924c2c6 |
42 | <p> |
633bc4a3 |
43 | This document is made of four parts : the first one explains how |
24070967 |
44 | to install LTTng and LTTV from sources, the second one describes the steps |
633bc4a3 |
45 | to follow to trace a system and view it. The third part explains |
c924c2c6 |
46 | briefly how to add a new trace point to the kernel and to user space |
633bc4a3 |
47 | applications. The fourth and last part explains how to create Debian or RPM |
48 | packages from the LTTng and LTTV sources. |
c924c2c6 |
49 | <p> |
24070967 |
50 | These operations are made for installing the LTTng 0.86 tracer on a linux 2.6.X |
c924c2c6 |
51 | kernel. You will also find instructions for installation of LTTV 0.12.x : the |
52 | Linux Trace Toolkit Viewer. |
24070967 |
53 | To see the list of compatibilities between LTTng, ltt-control, LTTV, please |
54 | refer to : |
c924c2c6 |
55 | <a |
56 | href="http://ltt.polymtl.ca/svn/trunk/lttv/doc/developer/lttng-lttv-compatibility.html">LTTng+LTTV versions compatibility</a> |
24070967 |
57 | The lttng patch is necessary to have the tracing hooks in the kernel. |
c924c2c6 |
58 | |
24070967 |
59 | <br> |
60 | <br> |
633bc4a3 |
61 | Supported architectures : |
6f88b01d |
62 | br> |
c924c2c6 |
63 | LTTng :<br> |
c924c2c6 |
64 | <li> x86 32/64 bits |
65 | <li> PowerPC 32 and 64 bits |
66 | <li> ARM (with limited timestamping precision, e.g. 1HZ. Need |
67 | architecture-specific support for better precision) |
68 | <li> MIPS |
69 | <br> |
24070967 |
70 | <br> |
c924c2c6 |
71 | LTTV :<br> |
c924c2c6 |
72 | <li> Intel 32/64 bits |
73 | <li> PowerPC 32 and 64 bits |
74 | <li> Possibly others. Takes care of endianness and type size difference between |
75 | the LTTng traces and the LTTV analysis tool. |
76 | |
f9ff56f3 |
77 | <hr /> |
78 | |
c924c2c6 |
79 | |
89aa576c |
80 | <h2><a href="#TOCsection1" name="section1">Installation from sources</a></h2> |
633bc4a3 |
81 | <p> |
c924c2c6 |
82 | |
6f88b01d |
83 | <h3><a href="#TOCprerequisites" name="prerequisites">Prerequisites</a></h3> |
633bc4a3 |
84 | <ul> |
85 | <p> |
c924c2c6 |
86 | Tools needed to follow the package download steps : |
87 | |
633bc4a3 |
88 | <li>wget |
89 | <li>bzip2 |
90 | <li>gzip |
91 | <li>tar |
c924c2c6 |
92 | |
633bc4a3 |
93 | <p> |
c924c2c6 |
94 | You have to install the standard development libraries and programs necessary |
95 | to compile a kernel : |
96 | |
84cf5903 |
97 | <PRE> |
c924c2c6 |
98 | (from Documentation/Changes in the Linux kernel tree) |
84cf5903 |
99 | Gnu C 2.95.3 # gcc --version |
100 | Gnu make 3.79.1 # make --version |
101 | binutils 2.12 # ld -v |
102 | util-linux 2.10o # fdformat --version |
103 | module-init-tools 0.9.10 # depmod -V |
104 | </PRE> |
c924c2c6 |
105 | |
633bc4a3 |
106 | <p> |
c924c2c6 |
107 | You might also want to have libncurses5 to have the text mode kernel |
108 | configuration menu, but there are alternatives. |
109 | |
633bc4a3 |
110 | <p> |
c924c2c6 |
111 | Prerequisites for LTTV 0.x.x installation are : |
112 | |
84cf5903 |
113 | <PRE> |
114 | gcc 3.2 or better |
115 | gtk 2.4 or better development libraries |
c924c2c6 |
116 | (Debian : libgtk2.0, libgtk2.0-dev) |
117 | (Fedora : gtk2, gtk2-devel) |
118 | note : For Fedora users : this might require at least core 3 from Fedora, |
119 | or you might have to compile your own GTK2 library. |
84cf5903 |
120 | glib 2.4 or better development libraries |
c924c2c6 |
121 | (Debian : libglib2.0-0, libglib2.0-dev) |
122 | (Fedora : glib2, glib2-devel) |
84cf5903 |
123 | libpopt development libraries |
c924c2c6 |
124 | (Debian : libpopt0, libpopt-dev) |
125 | (Fedora : popt) |
84cf5903 |
126 | libpango development libraries |
c924c2c6 |
127 | (Debian : libpango1.0, libpango1.0-dev) |
128 | (Fedora : pango, pango-devel) |
84cf5903 |
129 | libc6 development librairies |
c924c2c6 |
130 | (Debian : libc6, libc6-dev) |
131 | (Fedora : glibc, glibc) |
84cf5903 |
132 | </PRE> |
633bc4a3 |
133 | </ul> |
c924c2c6 |
134 | |
c8997124 |
135 | <li>Reminder</li> |
c924c2c6 |
136 | |
c8997124 |
137 | <p> |
633bc4a3 |
138 | See the list of compatibilities between LTTng, ltt-control and LTTV at : |
139 | <a |
140 | href="http://ltt.polymtl.ca/svn/trunk/lttv/doc/developer/lttng-lttv-compatibility.html">LTTng+LTTV |
141 | versions compatibility</a>. |
c924c2c6 |
142 | |
143 | |
6f88b01d |
144 | <h3><a href="#TOCgetlttng" name="getlttng">Getting the LTTng packages</a></h3> |
c924c2c6 |
145 | |
c8997124 |
146 | <PRE> |
c924c2c6 |
147 | su - |
148 | mkdir /usr/src/lttng |
149 | cd /usr/src/lttng |
150 | (see http://ltt.polymtl.ca/lttng for package listing) |
151 | wget http://ltt.polymtl.ca/lttng/patch-2.6.X-lttng-0.x.xx.tar.bz2 |
152 | bzip2 -cd patch-2.6.X-lttng-0.x.xx.tar.bz2 | tar xvof - |
c8997124 |
153 | </PRE> |
c924c2c6 |
154 | |
155 | |
6f88b01d |
156 | <h3><a href="#TOCgetlttngsrc" name="getlttngsrc">Getting LTTng kernel sources</a></h3> |
c924c2c6 |
157 | |
c8997124 |
158 | <PRE> |
c924c2c6 |
159 | su - |
160 | cd /usr/src |
161 | wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.X.tar.bz2 |
162 | bzip2 -cd linux-2.6.X.tar.bz2 | tar xvof - |
163 | cd linux-2.6.X |
164 | - For LTTng 0.9.4- cat /usr/src/lttng/patch*-2.6.X-lttng-0.x.xx* | patch -p1 |
165 | - For LTTng 0.9.5+ apply the patches in the order specified in the series file, |
166 | or use quilt |
167 | cd .. |
168 | mv linux-2.6.X linux-2.6.X-lttng-0.x.xx |
c8997124 |
169 | </PRE> |
c924c2c6 |
170 | |
171 | |
6f88b01d |
172 | <h3><a href="#TOCinstalllttng" name="installlttng">Installing a LTTng kernel</a></h3> |
c924c2c6 |
173 | |
c8997124 |
174 | <PRE> |
c924c2c6 |
175 | su - |
176 | cd /usr/src/linux-2.6.X-lttng-0.x.xx |
177 | make menuconfig (or make xconfig or make config) |
178 | Select the < Help > button if you are not familiar with kernel |
179 | configuration. |
180 | Items preceded by [*] means they has to be built into the kernel. |
181 | Items preceded by [M] means they has to be built as modules. |
182 | Items preceded by [ ] means they should be removed. |
183 | go to the "General setup" section |
184 | Select the following options : |
185 | [*] Prompt for development and/or incomplete code/drivers |
186 | [*] Activate markers |
187 | [*] Activate userspace markers ABI (experimental, optional) |
188 | [*] Immediate value optimization (optional) |
189 | [*] Linux Trace Toolkit Next Generation (LTTng) ---> |
190 | <M> or <*> Compile lttng tracing probes |
191 | <M> or <*> Linux Trace Toolkit High-speed Lockless Data Relay |
192 | <M> or <*> Linux Trace Toolkit Lock-Protected Data Relay |
193 | <M> or <*> Linux Trace Toolkit Serializer |
194 | <M> or <*> Linux Trace Toolkit Marker Control |
195 | <M> or <*> Linux Trace Toolkit Tracer |
196 | [*] Align Linux Trace Toolkit Traces |
197 | <M> or <*> Support logging events from userspace |
198 | [*] Support trace extraction from crash dump |
199 | <M> or <*> Linux Trace Toolkit Trace Controller |
200 | <M> or <*> Linux Trace Toolkit State Dump |
201 | Select <Exit> |
202 | Select <Exit> |
203 | Select <Yes> |
204 | make |
205 | make modules_install |
206 | (if necessary, create a initrd with mkinitrd or your preferate alternative) |
207 | (mkinitrd -o /boot/initrd.img-2.6.X-lttng-0.x.xx 2.6.X-lttng-0.x.xx) |
208 | |
209 | -- on X86, X86_64 |
210 | make install |
211 | reboot |
212 | Select the Linux 2.6.X-lttng-0.x.xx kernel in your boot loader. |
213 | |
214 | -- on PowerPC |
215 | cp vmlinux.strip /boot/vmlinux-2.6.X-lttng-0.x.xx |
216 | cp System.map /boot/System.map-2.6.X-lttng-0.x.xx |
217 | cp .config /boot/config-2.6.X-lttng-0.x.xx |
218 | depmod -ae -F /boot/System.map-2.6.X-lttng-0.x.xx 2.6.X-lttng-0.x.xx |
219 | mkinitrd /boot/initrd.img-2.6.X-lttng-0.x.xx 2.6.X-lttng-0.x.xx |
220 | (edit /etc/yaboot.conf to add a new entry pointing to your kernel : the entry |
221 | that comes first is the default kernel) |
222 | ybin |
223 | select the right entry at the yaboot prompt (see choices : tab, select : type |
224 | the kernel name followed by enter) |
225 | Select the Linux 2.6.X-lttng-0.x.xx kernel in your boot loader. |
226 | -- |
c8997124 |
227 | </PRE> |
c924c2c6 |
228 | |
6f88b01d |
229 | <h3><a href="#TOCeditconfig" name="editconfig">Editing the system wide |
230 | configuration</a></h3> |
c924c2c6 |
231 | |
c8997124 |
232 | <p> |
c924c2c6 |
233 | You must activate debugfs and specify a mount point. This is typically done in |
c8997124 |
234 | fstab such that it happens at boot time. If you have never used DebugFS before, |
235 | these operation would do this for you : |
c924c2c6 |
236 | |
c8997124 |
237 | <PRE> |
c924c2c6 |
238 | mkdir /mnt/debugfs |
239 | cp /etc/fstab /etc/fstab.lttng.bkp |
240 | echo "debugfs /mnt/debugfs debugfs rw 0 0" >> /etc/fstab |
c8997124 |
241 | </PRE> |
c924c2c6 |
242 | |
c8997124 |
243 | <p> |
c924c2c6 |
244 | then, rebooting or issuing the following command will activate debugfs : |
c8997124 |
245 | <PRE> |
c924c2c6 |
246 | mount /mnt/debugfs |
c8997124 |
247 | </PRE> |
c924c2c6 |
248 | |
c8997124 |
249 | <p> |
c924c2c6 |
250 | You need to load the LTT modules to be able to control tracing from user |
251 | space. This is done by issuing the following commands. Note however |
252 | these commands load all LTT modules. Depending on what options you chose to |
253 | compile statically, you may not need to issue all these commands. |
254 | |
c8997124 |
255 | <PRE> |
c924c2c6 |
256 | modprobe ltt-trace-control |
257 | modprobe ltt-marker-control |
258 | modprobe ltt-tracer |
259 | modprobe ltt-serialize |
260 | modprobe ltt-relay |
261 | modprobe ipc-trace |
262 | modprobe kernel-trace |
263 | modprobe mm-trace |
264 | modprobe net-trace |
265 | modprobe fs-trace |
266 | modprobe jbd2-trace |
267 | modprobe ext4-trace |
268 | modprobe syscall-trace |
269 | modprobe trap-trace |
270 | #if locking tracing is wanted, uncomment the following |
271 | #modprobe lockdep-trace |
c8997124 |
272 | </PRE> |
c924c2c6 |
273 | |
c8997124 |
274 | <p> |
c924c2c6 |
275 | If you want to have complete information about the kernel state (including all |
276 | the process names), you need to load the ltt-statedump module. This is done by |
277 | issuing the command : |
278 | |
c8997124 |
279 | <PRE> |
c924c2c6 |
280 | modprobe ltt-statedump |
c8997124 |
281 | </PRE> |
282 | <p> |
c924c2c6 |
283 | You can automate at boot time loading the ltt-control module by : |
284 | |
c8997124 |
285 | <PRE> |
c924c2c6 |
286 | cp /etc/modules /etc/modules.bkp |
287 | echo ltt-trace-control >> /etc/modules |
288 | echo ltt-marker-control >> /etc/modules |
289 | echo ltt-tracer >> /etc/modules |
290 | echo ltt-serialize >> /etc/modules |
291 | echo ltt-relay >> /etc/modules |
292 | echo ipc-trace >> /etc/modules |
293 | echo kernel-trace >> /etc/modules |
294 | echo mm-trace >> /etc/modules |
295 | echo net-trace >> /etc/modules |
296 | echo fs-trace >> /etc/modules |
297 | echo jbd2-trace >> /etc/modules |
298 | echo ext4-trace >> /etc/modules |
299 | echo syscall-trace >> /etc/modules |
300 | echo trap-trace >> /etc/modules |
301 | #if locking tracing is wanted, uncomment the following |
302 | #echo lockdep-trace >> /etc/modules |
c8997124 |
303 | </PRE> |
c924c2c6 |
304 | |
6f88b01d |
305 | |
306 | <h3><a href="#TOCgetlttctl" name="getlttctl">Getting and installing the |
307 | ltt-control package (on the traced machine)</a></h3> |
c8997124 |
308 | <p> |
c924c2c6 |
309 | (note : the ltt-control package contains lttd and lttctl. Although it has the |
310 | same name as the ltt-control kernel module, they are *not* the same thing.) |
c8997124 |
311 | |
312 | <PRE> |
c924c2c6 |
313 | su - |
314 | cd /usr/src |
315 | wget http://ltt.polymtl.ca/lttng/ltt-control-0.x-xxxx2006.tar.gz |
316 | gzip -cd ltt-control-0.x-xxxx2008.tar.gz | tar xvof - |
317 | cd ltt-control-0.x-xxxx2006 |
318 | (refer to README to see the development libraries that must be installed on you |
319 | system) |
320 | ./configure |
321 | make |
322 | make install |
c8997124 |
323 | </PRE> |
c924c2c6 |
324 | |
38b04cd7 |
325 | <h3><a href="#TOCuserspacetracing" name="userspacetracing">Userspace tracing</a></h3> |
c924c2c6 |
326 | |
c8997124 |
327 | <PRE> |
c924c2c6 |
328 | Make sure you selected the kernel menuconfig option : |
329 | <M> or <*> Support logging events from userspace |
330 | And that the ltt-userspace-event kernel module is loaded if selected as a |
331 | module. |
332 | |
333 | Simple userspace tracing is available through |
334 | echo "some text to record" > /mnt/debugfs/ltt/write_event |
335 | |
336 | It will appear in the trace under event : |
337 | channel : userspace |
338 | event name : event |
c8997124 |
339 | </PRE> |
c924c2c6 |
340 | |
6f88b01d |
341 | <h3><a href="#TOCgetlttv" name="getlttv">Getting and installing the LTTV package |
342 | (on the visualisation machine, same |
343 | or different from the visualisation machine)</a></h3> |
c924c2c6 |
344 | |
c8997124 |
345 | <PRE> |
c924c2c6 |
346 | su - |
347 | cd /usr/src |
348 | wget http://ltt.polymtl.ca/packages/lttv-0.x.xx-xxxx2008.tar.gz |
349 | gzip -cd lttv-0.x.xx-xxxx2008.tar.gz | tar xvof - |
350 | cd lttv-0.x.xx-xxxx2008 |
351 | (refer to README to see the development libraries that must be installed on your |
352 | system) |
353 | ./configure |
354 | make |
355 | make install |
13d7a628 |
356 | </PRE> |
c924c2c6 |
357 | |
c8997124 |
358 | <hr /> |
c924c2c6 |
359 | |
c924c2c6 |
360 | |
89aa576c |
361 | <h2><a href="#TOCsection2" name="section2">Using LTTng and LTTV</a></h2> |
c924c2c6 |
362 | |
c8997124 |
363 | <li>IMPORTANT : Arm Linux Kernel Markers after each boot</li> |
c8997124 |
364 | <PRE> |
c924c2c6 |
365 | ltt-armall |
c8997124 |
366 | </PRE> |
c924c2c6 |
367 | |
c8997124 |
368 | <li>Use graphical LTTV to control tracing and analyse traces</li> |
c8997124 |
369 | <PRE> |
c924c2c6 |
370 | lttv-gui (or /usr/local/bin/lttv-gui) |
371 | - Spot the "Tracing Control" icon : click on it |
372 | (it's a traffic light icon) |
373 | - enter the root password |
374 | - click "start" |
375 | - click "stop" |
376 | - Yes |
377 | * You should now see a trace |
c8997124 |
378 | </PRE> |
c924c2c6 |
379 | |
c8997124 |
380 | <li>Use text mode LTTng to control tracing</li> |
c8997124 |
381 | <PRE> |
c924c2c6 |
382 | The tracing can be controlled from a terminal by using the lttctl command (as |
383 | root). |
384 | |
385 | Start tracing : |
386 | |
387 | lttctl -C -w /tmp/trace1 trace1 |
388 | |
389 | Stop tracing and destroy trace channels : |
390 | |
391 | lttctl -D trace1 |
392 | |
393 | see lttctl --help for details. |
df7f63ab |
394 | </PRE> |
c8997124 |
395 | <p> |
c924c2c6 |
396 | (note : to see if the buffers has been filled, look at the dmesg output after |
397 | lttctl -R or after stopping tracing from the GUI, it will show an event lost |
398 | count. If it is the case, try using larger buffers. See lttctl --help to learn |
399 | how. lttv now also shows event lost messages in the console when loading a trace |
400 | with missing events or lost subbuffers.) |
401 | |
c8997124 |
402 | <li>Use text mode LTTV</li> |
c8997124 |
403 | <p> |
c924c2c6 |
404 | Feel free to look in /usr/local/lib/lttv/plugins to see all the text and |
405 | graphical plugins available. |
c8997124 |
406 | <p> |
c924c2c6 |
407 | For example, a simple trace dump in text format is available with : |
c8997124 |
408 | <PRE> |
c924c2c6 |
409 | lttv -m textDump -t /tmp/trace |
c8997124 |
410 | </PRE> |
c8997124 |
411 | <p> |
412 | See lttv -m textDump --help for detailed command line options of textDump. |
c8997124 |
413 | <p> |
c924c2c6 |
414 | It is, in the current state of the project, very useful to use "grep" on the |
415 | text output to filter by specific event fields. You can later copy the timestamp |
416 | of the events to the clipboard and paste them in the GUI by clicking on the |
417 | bottom right label "Current time". Support for this type of filtering should |
418 | be added to the filter module soon. |
419 | |
c8997124 |
420 | <li>Hybrid mode</li> |
c8997124 |
421 | <p> |
c924c2c6 |
422 | Starting from LTTng 0.5.105 and ltt-control 0.20, a new mode can be used : |
423 | hybrid. It can be especially useful when studying big workloads on a long period |
424 | of time. |
c8997124 |
425 | <p> |
c924c2c6 |
426 | When using this mode, the most important, low rate control information will be |
427 | recorded during all the trace by lttd (i.e. process creation/exit). The high |
428 | rate information (i.e. interrupt/traps/syscall entry/exit) will be kept in a |
429 | flight recorder buffer (now named flight-channelname_X). |
c8997124 |
430 | <p> |
c924c2c6 |
431 | The following lttctl commands take an hybrid trace : |
c8997124 |
432 | <p> |
c924c2c6 |
433 | Create trace channel, start lttd on normal channels, start tracing: |
c8997124 |
434 | <PRE> |
c924c2c6 |
435 | lttctl -C -w /tmp/trace2 -o channel.kernel.overwrite=1 trace2 |
c8997124 |
436 | </PRE> |
437 | <p> |
c924c2c6 |
438 | Stop tracing, start lttd on flight recorder channels, destroy trace channels : |
c8997124 |
439 | <PRE> |
c924c2c6 |
440 | lttctl -D -w /tmp/trace2 trace2 |
c8997124 |
441 | </PRE> |
442 | <p> |
c924c2c6 |
443 | Each "overwrite" channel is flight recorder channel. |
444 | |
c8997124 |
445 | <li>Flight recorder mode</li> |
c8997124 |
446 | <p> |
c924c2c6 |
447 | The flight recorder mode writes data into overwritten buffers for all channels, |
448 | including control channels, except for the facilities tracefiles. It consists of |
449 | setting all channels to "overwrite". |
c8997124 |
450 | <p> |
c924c2c6 |
451 | The following lttctl commands take a flight recorder trace : |
c8997124 |
452 | <PRE> |
c924c2c6 |
453 | lttctl -C -w /tmp/trace3 -o channel.all.overwrite=1 trace3 |
454 | ... |
455 | lttctl -D -w /tmp/trace3 trace3 |
c8997124 |
456 | </PRE> |
c924c2c6 |
457 | |
89aa576c |
458 | <hr /> |
459 | |
460 | |
461 | <h2><a href="#TOCsection3" name="section3">Adding new instrumentations with the |
462 | markers</a></h2> |
463 | <p> |
c924c2c6 |
464 | |
89aa576c |
465 | <p> |
c924c2c6 |
466 | See Documentation/markers.txt and Documentation/tracepoints.txt in your kernel |
467 | tree. |
468 | |
2e4e30d7 |
469 | <li>Add new events to userspace programs with |
470 | <a href="http://ltt.polymtl.ca/packages/">userspace markers packages</a></li> |
c924c2c6 |
471 | |
89aa576c |
472 | <p> |
c924c2c6 |
473 | Get the latest markers-userspace-*.tar.bz2 and see the Makefile and examples. It |
474 | allows inserting markers in executables and libraries, currently only on x86_32 |
475 | and x86_64. |
e01a1ce1 |
476 | See <a |
477 | href="http://ltt.polymtl.ca/packages/markers-userspace-0.5.tar.bz2">markers-userspace-0.5.tar.bz2</a> or more recent. |
478 | |
38b04cd7 |
479 | <p> |
e01a1ce1 |
480 | Note that a new design document for a 3rd generation of tracepoint/marker-based |
481 | userspace tracing is available at <a |
482 | href="http://ltt.polymtl.ca/svn/trunk/lttv/doc/developer/ust.html">LTTng User-space Tracing |
38b04cd7 |
483 | Design"</a>. This new infrastructure is not yet implemented. |
484 | |
485 | <p> |
486 | The easy quick-and-dirty way to perform userspace tracing is currently to write |
487 | an string to /mnt/debugfs/ltt/write_event. See <a |
488 | href="#userspacetracing">Userspace tracing</a> in the |
489 | installation for sources section of this document. |
e01a1ce1 |
490 | |
89aa576c |
491 | <hr /> |
633bc4a3 |
492 | |
89aa576c |
493 | <h2><a href="#TOCsection4" name="section4">Creating Debian or RPM packages</a></h2> |
494 | <p> |
633bc4a3 |
495 | |
89aa576c |
496 | <li>Create custom LTTV Debian packages</li> |
633bc4a3 |
497 | |
89aa576c |
498 | <PRE> |
499 | Use : dpkg-buildpackage -rfakeroot |
500 | </PRE> |
501 | <p> |
633bc4a3 |
502 | You should then have your LTTV .deb files created for your architecture. |
503 | |
89aa576c |
504 | <li>Create custom LTTng packages</li> |
505 | <p> |
633bc4a3 |
506 | For building LTTng Debian packages : |
89aa576c |
507 | get the build tree with patches applies as explained in section 2. |
633bc4a3 |
508 | |
89aa576c |
509 | <PRE> |
633bc4a3 |
510 | make menuconfig (or xconfig or config) (customize your configuration) |
511 | make-kpkg kernel_image |
89aa576c |
512 | </PRE> |
513 | <p> |
633bc4a3 |
514 | You will then see your freshly created .deb in /usr/src. Install it with |
89aa576c |
515 | <PRE> |
633bc4a3 |
516 | dpkg -i /usr/src/(image-name).deb |
89aa576c |
517 | </PRE> |
518 | <p> |
633bc4a3 |
519 | Then, follow the section "Editing the system wide configuration" in section 2. |
520 | |
521 | |
522 | |
c924c2c6 |
523 | </body> |
524 | </html> |