1 LTTNG USERSPACE TRACER (LTTng-UST)
2 ----------------------------
4 UST web site: http://lttng.org
6 Updated versions of this package may be found at:
8 * Releases: http://lttng.org/download
9 * GitWeb: http://git.lttng.org (project: lttng-ust)
10 * Git: git://git.lttng.org/lttng-ust.git
16 Userspace RCU library, by Mathieu Desnoyers and Paul E. McKenney
18 -> This release depends on liburcu v0.7.2
20 * Debian/Ubuntu package: liburcu-dev
21 * Website: http://lttng.org/urcu
22 * Releases: http://lttng.org/files/urcu
23 * GitWeb: http://lttng.org/cgi-bin/gitweb.cgi?p=userspace-rcu.git;a=summary
24 * Git: git://lttng.org/userspace-rcu.git
26 For developers using the git tree:
28 This source tree is based on the autotools suite from GNU to simplify
29 portability. Here are some things you should have on your system in order to
30 compile the git repository tree :
32 - GNU autotools (automake >=1.10, autoconf >=2.50, autoheader >=2.50)
33 (make sure your system wide "automake" points to a recent version!)
35 (for more information, go to http://www.gnu.org/software/autoconf/)
37 Needed for make check and tests.
39 If you get the tree from the repository, you will need to use the "bootstrap"
40 script in the root of the tree. It calls all the GNU tools needed to prepare the
44 INSTALLATION INSTRUCTIONS:
46 - Download, compile and install liburcu.
47 - In this package's tree, run ./configure.
52 If compiling from the git repository, run ./bootstrap before running
53 the configure script, to generate it.
55 Note that configure sets '/usr/local' as the default prefix for files it
56 installs. However, this path is not part of most distributions' default
57 library path which will cause builds depending on liblttng-ust to fail unless
58 '-L/usr/local/lib' is added to LDFLAGS. You may provide a custom prefix to
59 configure by using the --prefix switch.
63 - Create an instrumentation header following the tracepoint examples.
64 See lttng/tracepoint.h, and examples.
66 There are 2 ways to compile the Tracepoint Provider with the
67 application: either statically or dynamically. Please follow
70 1.1) Compile the Tracepoint provider with the application, either
71 directly or through a static library (.a):
72 - Into exactly one object of your application: define
73 "TRACEPOINT_DEFINE" and include the tracepoint provider.
74 - Use "-I." for the compilation unit containing the tracepoint
75 provider include (e.g. tp.c).
76 - Link application with "-ldl" on Linux, with "-lc" on BSD.
77 - If building the provider directly into the application,
78 link the application with "-llttng-ust".
79 - If building a static library for the provider, link the static
80 library with "-llttng-ust".
81 - Include the tracepoint provider header into all C files using
84 - doc/examples/easy-ust/ sample.c sample_component_provider.h
86 - doc/examples/hello-static-lib/ hello.c tp.c ust_test_hello.h
89 2) Compile the Tracepoint Provider separately from the application,
90 using dynamic linking:
91 - Into exactly one object of your application: define
92 "TRACEPOINT_DEFINE" _and_ also define
93 "TRACEPOINT_PROBE_DYNAMIC_LINKAGE", then include the tracepoint
95 - Include the tracepoint provider header into all instrumented C
96 files that use the provider.
97 - Compile the tracepoint provider with "-I.".
98 - Link the tracepoint provider with "-llttng-ust".
99 - Link application with "-ldl" on Linux, "-lc" on BSD.
100 - Set a LD_PRELOAD environment to preload the tracepoint provider
101 shared object before starting the application when tracing is
102 needed. Another way is to dlopen the tracepoint probe when needed
105 - doc/examples/demo demo.c tp*.c ust_tests_demo*.h demo-trace Makefile
107 - Note about dlclose() usage: it is not safe to use dlclose on a
108 provider shared object that is being actively used for tracing due
109 to a lack of reference counting from lttng-ust to the used shared
111 - Enable instrumentation and control tracing with the "lttng" command
112 from lttng-tools. See lttng-tools doc/quickstart.txt.
113 - Note for C++ support: since LTTng-UST 2.3, both tracepoints and
114 tracepoint probes can be compiled in C++. To compile tracepoint probes
115 in C++, you need g++ >= 4.7 or Clang.
118 ENVIRONMENT VARIABLES:
120 - liblttng-ust debug can be activated by setting the environment variable
121 "LTTNG_UST_DEBUG" when launching the application. It can also be enabled
122 at compile-time by compiling libust with -DLTTNG_UST_DEBUG.
124 - The environment variable "LTTNG_UST_REGISTER_TIMEOUT" can be used to
125 specify how long the applications should wait for sessiond
126 "registration done" command before proceeding to execute the main
127 program. The default is 3000ms (3 seconds). The timeout value is
128 specified in milliseconds. The value 0 means "don't wait". The value
129 -1 means "wait forever". Setting this environment variable to 0 is
130 recommended for applications with time constraints on the process
133 - The compilation flag "-DLTTNG_UST_DEBUG_VALGRIND" should be enabled
134 at build time to allow liblttng-ust to be used with valgrind
135 (side-effect: disables per-cpu buffering).
140 Use babeltrace for viewing traces generated by LTTng UST 2.x.
141 See http://lttng.org for download.
146 Maintainer: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
147 Mailing list: lttng-dev@lists.lttng.org
152 This package contains the following elements.
155 The actual userspace tracing library that must be linked to the
156 instrumented programs.
159 The public header files that will be installed on the system.
162 Various test programs
164 - liblttng-ust-libc-wrapper
165 An example library that can be LD_PRELOAD'ed to instrument some
166 calls to libc (currently malloc() and free()) in any program without
167 need to recompile it.
170 A library that is LD_PRELOAD'ed, and that hijacks calls to several system
171 calls in order to trace across these calls. It _has_ to be LD_PRELOAD'ed
172 in order to hijack calls. In contrast, libust may be linked at build time.
175 A library to control tracing in other processes. Used by lttng-tools.
178 A static library shared between libust and lttng-tools, that
179 provides functions that allow these components to communicate together.
182 The ring buffer implementation used within LTTng-UST.
185 An asynchronous signal-safe version of snprintf.
188 A simple library that uses JNI to allow tracing in java programs.
189 See liblttng-ust-java/README for build instructions.