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