Document dependency on libuuid
[lttng-ust.git] / README
1 LTTNG USERSPACE TRACER (LTTng-UST)
2 ----------------------------
3
4 UST web site: http://lttng.org/lttng2.0
5
6 Updated versions of this package may be found at:
7
8 * Website: http://lttng.org/lttng2.0
9 * Releases: http://lttng.org/files/lttng-ust
10 * GitWeb: http://git.lttng.org (project: lttng-ust)
11 * Git: git://git.lttng.org/lttng-ust.git
12
13
14 PREREQUISITES:
15
16 - liburcu
17 Userspace RCU library, by Mathieu Desnoyers and Paul E. McKenney
18
19 -> This release depends on liburcu v0.7.2
20
21 * Debian/Ubuntu package: liburcu-dev
22 * Website: http://lttng.org/urcu
23 * Releases: http://lttng.org/files/urcu
24 * GitWeb: http://lttng.org/cgi-bin/gitweb.cgi?p=userspace-rcu.git;a=summary
25 * Git: git://lttng.org/userspace-rcu.git
26
27 - libuuid (for Linux)
28
29 For developers using the git tree:
30
31 This source tree is based on the autotools suite from GNU to simplify
32 portability. Here are some things you should have on your system in order to
33 compile the git repository tree :
34
35 - GNU autotools (automake >=1.10, autoconf >=2.50, autoheader >=2.50)
36 (make sure your system wide "automake" points to a recent version!)
37 - GNU Libtool >=2.2
38 (for more information, go to http://www.gnu.org/software/autoconf/)
39
40 If you get the tree from the repository, you will need to use the "bootstrap"
41 script in the root of the tree. It calls all the GNU tools needed to prepare the
42 tree configuration.
43
44
45 INSTALLATION INSTRUCTIONS:
46
47 - Download, compile and install liburcu.
48 - In this package's tree, run ./configure.
49 - Run make.
50 - Run make install.
51 - Run ldconfig.
52
53 If compiling from the git repository, run ./bootstrap before running
54 the configure script, to generate it.
55
56
57 USAGE:
58
59 - Create an instrumentation header following the tracepoint examples.
60 See lttng/tracepoint.h, and examples.
61
62 There are 2 ways to compile the Tracepoint Provider with the
63 application: either statically or dynamically. Please follow
64 carefully:
65
66 1.1) Compile the Tracepoint provider with the application, either
67 directly or through a static library (.a):
68 - Into exactly one object of your application: define
69 "TRACEPOINT_DEFINE" and include the tracepoint provider.
70 - Use "-I." for the compilation unit containing the tracepoint
71 provider include (e.g. tp.c).
72 - Link application with "-ldl" on Linux, with "-lc" on BSD.
73 - If building the provider directly into the application,
74 link the application with "-llttng-ust".
75 - If building a static library for the provider, link the static
76 library with "-lllttng-ust".
77 - Include the tracepoint provider header into all C files using
78 the provider.
79 - Example:
80 tests/hello/ hello.c tp.c ust_tests_hello.h Makefile.example.*
81
82 2) Compile the Tracepoint Provider separately from the application,
83 using dynamic linking:
84 - Into exactly one object of your application: define
85 "TRACEPOINT_DEFINE" _and_ also define
86 "TRACEPOINT_PROBE_DYNAMIC_LINKAGE", then include the tracepoint
87 provider header.
88 - Include the tracepoint provider header into all instrumented C
89 files that use the provider.
90 - Compile the tracepoint provider with "-I.".
91 - Link the tracepoint provider with "-llttng-ust".
92 - Link application with "-ldl" on Linux, "-lc" on BSD.
93 - Set a LD_PRELOAD environment to preload the tracepoint provider
94 shared object before starting the application when tracing is
95 needed. Another way is to dlopen the tracepoint probe when needed
96 by the application.
97 - Example:
98 - tests/demo/ demo.c tp*.c ust_tests_demo*.h demo-trace
99
100 - Enable instrumentation and control tracing with the "lttng" command
101 from lttng-tools. See lttng-tools doc/quickstart.txt.
102
103 ENVIRONMENT VARIABLES:
104
105 - liblttng-ust debug can be activated by setting the environment variable
106 "LTTNG_UST_DEBUG" when launching the application. It can also be enabled
107 at compile-time by compiling libust with -DLTTNG_UST_DEBUG.
108
109 - The environment variable "LTTNG_UST_REGISTER_TIMEOUT" can be used to
110 specify how long the applications should wait for sessiond
111 "registration done" command before proceeding to execute the main
112 program. The default is 3000ms (3 seconds). The timeout value is
113 specified in milliseconds. The value 0 means "don't wait". The value
114 -1 means "wait forever". Setting this environment variable to 0 is
115 recommended for applications with time constraints on the process
116 startup time.
117
118 - The compilation flag "-DLTTNG_UST_DEBUG_VALGRIND" should be enabled
119 at build time to allow liblttng-ust to be used with valgrind
120 (side-effect: disables per-cpu buffering).
121
122
123 TRACE VIEWER:
124
125 Use babeltrace for viewing traces generated by LTTng UST 2.0.
126 See http://lttng.org for download.
127
128
129 CONTACT:
130
131 Maintainer: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
132 Mailing list: lttng-dev@lists.lttng.org
133
134
135 PACKAGE CONTENTS:
136
137 This package contains the following elements.
138
139 - liblttng-ust
140 The actual userspace tracing library that must be linked to the
141 instrumented programs.
142
143 - include
144 The public header files that will be installed on the system.
145
146 - tests
147 Various test programs
148
149 - liblttng-ust-libc-wrapper
150 An example library that can be LD_PRELOAD'ed to instrument some
151 calls to libc (currently malloc() and free()) in any program without
152 need to recompile it.
153
154 - liblttng-ust-fork
155 A library that is LD_PRELOAD'ed, and that hijacks calls to several system
156 calls in order to trace across these calls. It _has_ to be LD_PRELOAD'ed
157 in order to hijack calls. In contrast, libust may be linked at build time.
158
159 - liblttng-ust-ctl
160 A library to control tracing in other processes. Used by lttng-tools.
161
162 - liblttng-ust-comm
163 A static library shared between libust and lttng-tools, that
164 provides functions that allow these components to communicate together.
165
166 - libringbuffer
167 The ring buffer implementation used within LTTng-UST.
168
169 - snprintf
170 An asynchronous signal-safe version of snprintf.
171
172 - liblttng-ust-java
173 A simple library that uses JNI to allow tracing in java programs.
174 See liblttng-ust-java/README for build instructions.
This page took 0.033336 seconds and 5 git commands to generate.