[lttng-dev] [PATCH] Add a man page for lttng-gen-tp

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Feb 16 12:33:58 EST 2012


* Yannick Brosseau (yannick.brosseau at gmail.com) wrote:
> (Closes #24)
> 

merged, thanks!

Mathieu

> Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
> ---
>  doc/man/lttng-gen-tp.1 |  110 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 110 insertions(+), 0 deletions(-)
>  create mode 100644 doc/man/lttng-gen-tp.1
> 
> diff --git a/doc/man/lttng-gen-tp.1 b/doc/man/lttng-gen-tp.1
> new file mode 100644
> index 0000000..3c7034c
> --- /dev/null
> +++ b/doc/man/lttng-gen-tp.1
> @@ -0,0 +1,110 @@
> +.TH "LTTNG-GEN-TP" "1" "February 16, 2012" "" ""
> +
> +.SH "NAME"
> +lttng-gen-tp \(em LTTng UST 2.0 tracepoint code generator
> +
> +.SH "SYNOPSIS"
> +
> +.PP
> +.nf
> +lttng\-gen\-tp [OPTIONS] TEMPLATE_FILE
> +.fi
> +.SH "DESCRIPTION"
> +
> +.PP
> +The LTTng project aims at providing highly efficient tracing tools for Linux.
> +It's tracers help tracking down performance issues and debugging problems
> +involving multiple concurrent processes and threads. Tracing across multiple
> +systems is also possible.
> +
> +The \fBlttng\-gen\-tp\fP tool simplify the generation of the UST tracepoint
> +files. It takes a simple template file and generate the necessary code to use the defined tracepoints in your application.
> +The section TEMPLATE FILE FORMAT describe the content of the template file.
> +
> +Currently, the tool can generate the .h and .c associated to your
> +tracepoint. The generated .h can be directly included in your application.
> +You need to compile the .c into a .o, .a or .so at your choice and
> +link it with your application. Refer to the UST documentation for the
> +advantages and disadvantage of each form.
> +To compile the resulting .c file, you need to add the options
> +"-llttng-ust -I."
> +
> +.SH "OPTIONS"
> +
> +.PP
> +This program follow the usual GNU command line syntax with long options starting with
> +two dashes. Below is a summary of the available options.
> +.PP
> +
> +.TP
> +.BR "\-h, \-\-help"
> +Show summary of possible options and commands.
> +.TP
> +.BR "\-v, \-\-verbose"
> +Increase verbosity.
> +.TP
> +.BR "\-o, \-\-output"
> +Specify the generated file. The type of the generated file depend on the file
> +extension (.h, .c).
> +This option can be specfied multiple times to generate different file type.
> +
> +.PP
> +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.
> +
> +.SH "TEMPLATE FILE FORMAT"
> +
> +The template file, which has the usual extention \fB.tp\fP, contains a list of
> +TRACEPOINT_EVENT definitions and other optional definition entries like
> +TRACEPOINT_LOGLEVEL.
> +(See lttng-ust(3) for the complete list of available definition.)
> +
> +You write them as you would write them in a C header file. You can add
> +comments with \fB/* */\fP, \fB//\fP and \fB#\fP.
> +
> +The provider name (the first field of TRACEPOINT_EVENT) must be
> +the same for the whole file.
> +
> +.TP
> +.SH "Example"
> +.TP
> +.nf
> +TRACEPOINT_EVENT(
> +    sample_tracepoint,
> +    message, // Comment
> +    TP_ARGS(char *, text),
> +    /* Next are the fields */
> +    TP_FIELDS(
> +        ctf_string(message, text)
> +    )
> +)
> +
> +.SH "SEE ALSO"
> +
> +.PP
> +lttng-ust(3), lttng(1)
> +.PP
> +.SH "BUGS"
> +
> +.PP
> +If you encounter any issues or usability problem, please report it on our
> +mailing list <lttng-dev at lists.lttng.org> to help improve this project.
> +.SH "CREDITS"
> +
> +.PP
> +lttng\-gen\-tp is distributed under the GNU General Public License version 2. See the file
> +COPYING for details.
> +.PP
> +A Web site is available at http://lttng.org for more information on the LTTng
> +project.
> +.PP
> +You can also find our git tree at http://git.lttng.org.
> +.PP
> +Mailing lists for support and development: <lttng-dev at lists.lttng.org>.
> +.PP
> +You can find us on IRC server irc.oftc.net (OFTC) in #lttng.
> +.PP
> +.SH "AUTHORS"
> +
> +.PP
> +lttng\-gen\-tp is written by Yannick Brosseau <yannick.brosseau at gmail.com>.
> +.PP
> -- 
> 1.7.9
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list