Add a man page for lttng-gen-tp
[lttng-ust.git] / doc / man / lttng-gen-tp.1
CommitLineData
7e3821f0
YB
1.TH "LTTNG-GEN-TP" "1" "February 16, 2012" "" ""
2
3.SH "NAME"
4lttng-gen-tp \(em LTTng UST 2.0 tracepoint code generator
5
6.SH "SYNOPSIS"
7
8.PP
9.nf
10lttng\-gen\-tp [OPTIONS] TEMPLATE_FILE
11.fi
12.SH "DESCRIPTION"
13
14.PP
15The LTTng project aims at providing highly efficient tracing tools for Linux.
16It's tracers help tracking down performance issues and debugging problems
17involving multiple concurrent processes and threads. Tracing across multiple
18systems is also possible.
19
20The \fBlttng\-gen\-tp\fP tool simplify the generation of the UST tracepoint
21files. It takes a simple template file and generate the necessary code to use the defined tracepoints in your application.
22The section TEMPLATE FILE FORMAT describe the content of the template file.
23
24Currently, the tool can generate the .h and .c associated to your
25tracepoint. The generated .h can be directly included in your application.
26You need to compile the .c into a .o, .a or .so at your choice and
27link it with your application. Refer to the UST documentation for the
28advantages and disadvantage of each form.
29To compile the resulting .c file, you need to add the options
30"-llttng-ust -I."
31
32.SH "OPTIONS"
33
34.PP
35This program follow the usual GNU command line syntax with long options starting with
36two dashes. Below is a summary of the available options.
37.PP
38
39.TP
40.BR "\-h, \-\-help"
41Show summary of possible options and commands.
42.TP
43.BR "\-v, \-\-verbose"
44Increase verbosity.
45.TP
46.BR "\-o, \-\-output"
47Specify the generated file. The type of the generated file depend on the file
48extension (.h, .c).
49This option can be specfied multiple times to generate different file type.
50
51.PP
52When no output is specified de default files are generated with the same base filename as the template file. The default files are: .h, .c.
53
54.SH "TEMPLATE FILE FORMAT"
55
56The template file, which has the usual extention \fB.tp\fP, contains a list of
57TRACEPOINT_EVENT definitions and other optional definition entries like
58TRACEPOINT_LOGLEVEL.
59(See lttng-ust(3) for the complete list of available definition.)
60
61You write them as you would write them in a C header file. You can add
62comments with \fB/* */\fP, \fB//\fP and \fB#\fP.
63
64The provider name (the first field of TRACEPOINT_EVENT) must be
65the same for the whole file.
66
67.TP
68.SH "Example"
69.TP
70.nf
71TRACEPOINT_EVENT(
72 sample_tracepoint,
73 message, // Comment
74 TP_ARGS(char *, text),
75 /* Next are the fields */
76 TP_FIELDS(
77 ctf_string(message, text)
78 )
79)
80
81.SH "SEE ALSO"
82
83.PP
84lttng-ust(3), lttng(1)
85.PP
86.SH "BUGS"
87
88.PP
89If you encounter any issues or usability problem, please report it on our
90mailing list <lttng-dev@lists.lttng.org> to help improve this project.
91.SH "CREDITS"
92
93.PP
94lttng\-gen\-tp is distributed under the GNU General Public License version 2. See the file
95COPYING for details.
96.PP
97A Web site is available at http://lttng.org for more information on the LTTng
98project.
99.PP
100You can also find our git tree at http://git.lttng.org.
101.PP
102Mailing lists for support and development: <lttng-dev@lists.lttng.org>.
103.PP
104You can find us on IRC server irc.oftc.net (OFTC) in #lttng.
105.PP
106.SH "AUTHORS"
107
108.PP
109lttng\-gen\-tp is written by Yannick Brosseau <yannick.brosseau@gmail.com>.
110.PP
This page took 0.026926 seconds and 4 git commands to generate.