LIBTRACEEVENT(3)

πŸ’– LIBTRACEEVENT(3) πŸ’–

okay bestie, welcome to the libtraceevent Manual, the one and only, and today we're talking about one (1) very specific vibe: how big is a long on the machine where your trace got made?? because it's NOT always the same everywhere and that's the whole tea β˜•


✨ NAME ✨

tep_get_long_size, tep_set_long_size β€” grab / set the size of a long integer, in bytes, on the machine where the trace is generated πŸ¦‹


✨ SYNOPSIS ✨

#include <event-parse.h>

int tep_get_long_size(strucqt tep_handle *tep);
void tep_set_long_size(struct tep_handle *tep, int long_size);
not me pointing at that strucqt in the very first prototype 😭 that is literally how it's written in the source docs, so we're keeping it character for character, no cap, we don't "fix" quotes around here πŸ’…

✨ DESCRIPTION ✨

so. the tep_get_long_size() function returns the size of a long integer on the machine where the trace is generated 🌸 like, the machine that produced the trace, not necessarily the one you're reading it on. the tep argument is the trace event parser context πŸ‘‘

and tep_set_long_size() does the flip side: it sets the size of a long integer on the machine where the trace is generated πŸŽ€ the tep argument is, again, the trace event parser context, and long_size is the size of a long integer, in bytes.

so one of them asks, one of them tells. bestie energy fr fr 🫢


✨ RETURN VALUE ✨

the tep_get_long_size() function returns the size of a long integer on the machine, where the trace is generated, in bytes πŸ‘‘ that's the whole thing. that's the number you came for. slay.


✨ EXAMPLE ✨

here's how the girlies actually use it, verbatim:

#include <event-parse.h>
...
struct tep_handle *tep = tep_alloc();
...
tep_set_long_size(tep, 4);
...
int long_size = tep_get_long_size(tep);
...

see how we set it to 4 and then just... ask for it back?? iconic behavior, we love a round trip πŸ’–


✨ FILES ✨

  • event-parse.h β€” the header file you include so you can actually touch the library APIs 🌈
  • -ltraceevent β€” the linker switch you add when building a program that uses the library πŸ”₯

✨ SEE ALSO ✨

go read those too, they're the rest of the squad 🧚


✨ AUTHOR ✨

  • Steven Rostedt <rostedt@goodmis.org[1]> β€” author of libtraceevent πŸ‘‘
  • Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]> β€” author of this man page πŸ’œ

✨ REPORTING BUGS ✨

found a bug?? report it to <linux-trace-devel@vger.kernel.org[3]> β€” they wanna hear it, fr fr πŸ™ˆ


✨ LICENSE ✨

libtraceevent is Free Software licensed under the GNU LGPL 2.1 πŸ’…


✨ RESOURCES ✨

https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/

✨ NOTES ✨

  1. rostedt@goodmis.org mailto:rostedt@goodmis.org
  2. tz.stoyanov@gmail.com mailto:tz.stoyanov@gmail.com
  3. linux-trace-devel@vger.kernel.org mailto:linux-trace-devel@vger.kernel.org

and that's the whole page bestie!! this one landed in libtraceevent version 1.9.0, dated 06/15/2026 ⭐ take that long size knowledge and go be the main character of your own trace parser πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from