LTTNG-GEN-TP(1)
β¨ lttng-gen-tp β¨
okay bestie, so this is a page from the LTTng Manual, and the command is lttng-gen-tp β she's the one who writes your tracepoint provider code for you so you don't have to π
πΈ NAME πΈ
lttng-gen-tp β Generate LTTng-UST tracepoint provider code
π SYNOPSIS π
lttng-gen-tp [--verbose] [--output=FILE.c]
[--output=FILE.h] [--output=FILE.o] TEMPLATE
π DESCRIPTION π
The lttng-gen-tp tool is literally here to simplify the generation of LTTng-UST tracepoint provider files. You hand it a simple template file, TEMPLATE, and it spits out all the C code you need to actually use the tracepoints you defined in your app. Wanna know what TEMPLATE is supposed to look like? Scroll down to the Template file format section, iykyk.
Currently, lttng-gen-tp can generate the .h, .c, and .o files that go with your tracepoint provider. The generated .h file can be included directly in your application β no extra steps, just slay. You can let lttng-gen-tp generate the .o file for you, or you can compile the .c file yourself, your call, main character energy either way. Wanna know more about compiling LTTng-UST tracepoint providers? See lttng-ust(3).
By default, lttng-gen-tp generates the .h, .c, and .o files, and their basename is the basename of TEMPLATE. But if you only want some of them, you can generate one or more specific file types with the --output option β just repeat it as many times as you need π«Ά
π¦ Template file format π¦
The template file β which usually has the .tp extension, cute β contains a list of LTTNG_UST_TRACEPOINT_EVENT() definitions plus other optional definition entries, like LTTNG_UST_TRACEPOINT_LOGLEVEL(). For the complete list of available definitions, see lttng-ust(3).
The LTTNG_UST_TRACEPOINT_EVENT() definitions are written exactly as you would write them in an LTTng-UST template provider header file. C comments are supported (/* */ and //), and so are lines starting with #.
Note The provider name (the first argument ofLTTNG_UST_TRACEPOINT_EVENT()) must be the same in all theLTTNG_UST_TRACEPOINT_EVENT()macros ofTEMPLATE. No switching up mid-file, bestie, she will notice π
Here's an example:
LTTNG_UST_TRACEPOINT_EVENT(
// Tracepoint provider name
my_provider,
// Tracepoint/event name
my_event,
// Tracepoint arguments (input)
LTTNG_UST_TP_ARGS(char *, text),
// Tracepoint/event fields (output)
LTTNG_UST_TP_FIELDS(
lttng_ust_field_string(message, text)
)
)
β¨ OPTIONS β¨
-o,--output=FILEβ Do not generate the default files: generateFILEinstead.
The extension of FILE is what decides what gets generated, out of .h, .c, and .o. You can use this option more than one time to generate different file types. Go off π
-v,--verboseβ Increase verbosity. She'll tell you more about what she's doing.-h,--helpβ Show command help.
π ENVIRONMENT VARIABLES π
CCβ C compiler to use. Default:cc, thengccifccis not found. This option is only relevant when generating the.ofile.CFLAGSβ Flags and options passed directly to the compiler ($CC). This option is only relevant when generating the.ofile.
π EXIT STATUS π
0β Success π- Non-zero β Error π
π BUGS π
If you encounter any issue or usability problem, please report it on the LTTng bug tracker https://bugs.lttng.org/projects/lttng-ust. Do it fr fr, they wanna know π
π RESOURCES π
- LTTng project website
http://lttng.org - LTTng documentation
http://lttng.org/docs - Git repositories
http://git.lttng.org - GitHub organization
http://github.com/lttng - Continuous integration
http://ci.lttng.org - Mailing list
http://lists.lttng.orgfor support and development:lttng-dev@lists.lttng.org - IRC channel
irc://irc.oftc.net/lttng:#lttngonirc.oftc.net
π COPYRIGHTS π
lttng-gen-tp is part of the LTTng-UST project.
lttng-gen-tp is distributed under the GNU General Public License, version 2 http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. See the COPYING file https://github.com/lttng/lttng-ust/blob/v2.14/COPYING for more details.
π§ AUTHOR π§
lttng-gen-tp was originally written by Yannick Brosseau yannick.brosseau@gmail.com. It is currently maintained by Mathieu Desnoyers mathieu.desnoyers@efficios.com. Iconic lineage honestly π
π SEE ALSO π
and that's the whole page bestie!! this one's from LTTng 2.14.0, dated 06/27/2025 β no cap, go generate some tracepoint providers π β¨π¦
π¦ where this page comes from
- alpine 3.23: lttng-ust-doc 2.14.0-r0 Β· LGPL-2.1-only AND GPL-2.0-only AND MIT
- fedora 43: lttng-ust-devel 2.14.0-4.fc43 Β· LGPL-2.1-only AND MIT AND GPL-2.0-only AND BSD-3-Clause AND BSD-2-Clause
- fedora 43: lttng-ust-devel 2.14.0-4.fc43 Β· LGPL-2.1-only AND MIT AND GPL-2.0-only AND BSD-3-Clause AND BSD-2-Clause
- fedora 44: lttng-ust-devel 2.14.0-5.fc44 Β· LGPL-2.1-only AND MIT AND GPL-2.0-only AND BSD-3-Clause AND BSD-2-Clause
- fedora 44: lttng-ust-devel 2.14.0-5.fc44 Β· LGPL-2.1-only AND MIT AND GPL-2.0-only AND BSD-3-Clause AND BSD-2-Clause
- ubuntu resolute: liblttng-ust-dev 2.14.0-1.1 Β· CC-BY-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms