LIBTRACEEVENT(3)
π LIBTRACEEVENT β the flags era π
ok so bestie, this is the libtraceevent manual page, and today we're talking about tep_set_flag, tep_clear_flag and tep_test_flag β the trio that manages all the flags of your trace event parser context. it's giving switchboard operator energy and honestly? we're obsessed. π
β¨ NAME β¨
tep_set_flag, tep_clear_flag, tep_test_flag β Manage flags of trace event parser context. yes, that's the whole job. and they SLAY at it. π
πΈ SYNOPSIS πΈ
#include <event-parse.h>
enum tep_flag {
TEP_NSEC_OUTPUT,
TEP_DISABLE_SYS_PLUGINS,
TEP_DISABLE_PLUGINS
};
void tep_set_flag(struct tep_handle *tep, enum tep_flag flag);
void tep_clear_flag(struct tep_handle *tep, enum tep_flag flag);
bool tep_test_flag(struct tep_handle *tep, enum tep_flag flag);
look at that. three little functions. infinite potential. β¨
π¦ DESCRIPTION π¦
okay so the trace event parser context flags all live in enum tep_flag, and here's the full rundown because we do not gatekeep:
TEP_NSEC_OUTPUTβ print event's timestamp in nano seconds, instead of micro seconds. tiny numbers, big flex. β±οΈTEP_DISABLE_SYS_PLUGINSβ disable plugins, located in system's plugin directory. this directory is defined at library compile time, and usually depends on library installation prefix:(install_preffix)/lib/traceevent/plugins. (yes, that spelling in the path is exactly how it's written, don't come for me. π)TEP_DISABLE_PLUGINSβ disable all library plugins. every last one:- in system's plugin directory
- in directory, defined by the environment variable
TRACEEVENT_PLUGIN_DIR - in user's home directory,
~/.traceevent/plugins
β οΈ Note: plugin related flags must me set before calling tep_load_plugins() API. (that "me" is the original's typo, bestie, i'm just the messenger β but the meaning is LOUD and CLEAR: set these flags FIRST.)
and now the three icons themselves:
tep_set_flag()setsflagtotepcontext. πtep_clear_flag()clearsflagfromtepcontext. π§Ήtep_test_flag()tests ifflagis set totepcontext. π
π₯ RETURN VALUE π₯
tep_test_flag() returns true if flag is set, false otherwise. that's it. binary. no nuance. very main character. π
π EXAMPLE π
here's the whole vibe in code, straight up, exactly as written:
#include <event-parse.h>
...
struct tep_handle *tep = tep_alloc();
...
/* Print timestamps in nanoseconds */
tep_set_flag(tep, TEP_NSEC_OUTPUT);
...
if (tep_test_flag(tep, TEP_NSEC_OUTPUT)) {
/* print timestamps in nanoseconds */
} else {
/* print timestamps in microseconds */
}
...
/* Print timestamps in microseconds */
tep_clear_flag(tep, TEP_NSEC_OUTPUT);
...
set it, check it, clear it, repeat. that's the whole arc. π«Ά
π FILES π
event-parse.hβ Header file to include in order to have access to the library APIs.-ltraceeventβ Linker switch to add when building a program that uses the library.
β SEE ALSO β
libtraceevent(3), trace-cmd(1)
go read those too, bestie, knowledge is free and it's cute. π
π AUTHOR π
- Steven Rostedt <
rostedt@goodmis.org[1]>, author of libtraceevent. - Tzvetomir Stoyanov <
tz.stoyanov@gmail.com[2]>, author of this man page.
legends, both of them, no cap. π
π REPORTING BUGS π
Report bugs to <linux-trace-devel@vger.kernel.org[3]>
(be nice about it, they're doing their best, and their best is honestly iconic. π)
π LICENSE π
libtraceevent is Free Software licensed under the GNU LGPL 2.1
π RESOURCES π
https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
π§ NOTES π§
rostedt@goodmis.orgβmailto:rostedt@goodmis.orgtz.stoyanov@gmail.comβmailto:tz.stoyanov@gmail.comlinux-trace-devel@vger.kernel.orgβmailto:linux-trace-devel@vger.kernel.org
and that's the page, babes π this was libtraceevent 1.9.0, from the libtraceevent Manual, dated 06/15/2026 β go set some flags, you absolute icon. periodt. π β¨
π¦ where this page comes from
- ubuntu stonking: libtraceevent-doc 1:1.9.0-2 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms