Escape minus signs in lttng-ust-cyg-profile manpage
[lttng-ust.git] / doc / man / lttng-ust-cyg-profile.3
CommitLineData
d1eaa4d7
PW
1.TH "LTTNG-UST-CYG-PROFILE" "3" "March 26, 2013" "" ""
2.SH "NAME"
77ca1460 3lttng-ust-cyg-profile \(em LTTng UST 2.x Function Tracing
d1eaa4d7
PW
4.SH "SYNOPSIS"
5Compile the application source code with option \fB-finstrument-functions\fP
6and launch your application either with:
7.TP
8\fBLD_PRELOAD=liblttng-ust-cyg-profile-fast.so\fP appname
9.PP
10or (to use verbose function tracing)
11.TP
12\fBLD_PRELOAD=liblttng-ust-cyg-profile.so\fP appname
13.PP
14All events emitted for function tracing are provided on loglevel
15TRACE_DEBUG_FUNCTION. The following command can be used to add
16function tracing events in your trace session:
17.TP
18.B lttng enable-event -u -a --loglevel-only TRACE_DEBUG_FUNCTION
19.SH "DESCRIPTION"
20For compilers that provide code generation option
21\fB-finstrument-functions\fP (e.g. GCC and LLVM/Clang) LTTng-UST provides
22shared libraries that allow users to trace the function flow of their
23applications.
24
25Function tracing comes in two flavors (each providing different trade-offs):
26.IP liblttng-ust-cyg-profile-fast.so
27This is a lightweight variant that should only be used where it can be
28guaranteed that the complete event stream is recorded without any missing
29events. Any kind of duplicate information is left out.
30
31At each function entry the address of the called function is recored as
32lttng_ust_cyg_profile_fast:func_entry. Function exit is recorded as
33lttng_ust_cyg_profile_fast:func_exit (without any field data).
34
35.IP liblttng-ust-cyg-profile.so
36This is a more robust variant which also works for use-cases where events
37might get discarded or not recorded from application startup. In these cases
38the trace analyzer needs extra information to be able to reconstruct the
39program flow.
40
41For each function entry and exit the address of the called function and the
42call site address are recorded as lttng_ust_cyg_profile:func_entry and
43lttng_ust_cyg_profile:func_exit.
44.SH "USAGE"
45To use function tracing you need to make sure the sources of your application
bdc3e272 46are compiled with \-finstrument\-functions. It might be necessary to limit
d1eaa4d7
PW
47the number of source files where this option is used to prevent excessive
48amount of trace data to be generated during run time. Usually there are
49additional compiler flags that allow you to specify more fine grained selection
50of function instrumentation.
51
52For each instrumented function the executable will contain calls to profiling
53function hooks (after function entry and just before function exit).
54
55By preloading (LD_PRELOAD) one of the provided shared libraries, these
56profiling hooks get defined to emit LTTng events (as described above).
57
58Using this feature can result in massive amount trace data to be generated
59by the instrumented application. Application runtime is also considerably
60affected. Be careful on systems with limited resources.
61.SH "SEE ALSO"
62lttng-ust(3), lttng(1), gcc(1), ld.so(8)
63.SH "BUGS"
64If you encounter any issues or usability problem, please report it on
65our mailing list <lttng-dev@lists.lttng.org> to help improve this
66project.
67.SH "CREDITS"
68liblttng-ust is distributed under the GNU Lesser General Public License
69version 2.1. The headers are distributed under the MIT license.
70
71See http://lttng.org for more information on the LTTng project.
72
73Mailing list for support and development: <lttng-dev@lists.lttng.org>.
74
75You can find us on IRC server irc.oftc.net (OFTC) in #lttng.
76.SH "AUTHORS"
77liblttng-ust was originally written by Mathieu Desnoyers, with additional
78contributions from various other people. It is currently maintained by
79Mathieu Desnoyers <mathieu.desnoyers@efficios.com>.
This page took 0.024817 seconds and 4 git commands to generate.