LIBTRACEEVENT(3)
π¦ LIBTRACEEVENT(3) β libtraceevent Manual π¦
okay bestie, so this is a page from the libtraceevent manual. sit down, sip ur drink, we're gonna talk about CPUs and their tracing buffers π
β¨ NAME β¨
tep_get_cpus, tep_set_cpus β get / set the number of CPUs that have a tracing buffer representing them. and before u get any ideas: the buffer may be empty. like, it exists, it's there, it's just not giving content, yk? π«Ά
β¨ SYNOPSIS β¨
#include <event-parse.h>
int tep_get_cpus(struct tep_handle *tep);
void tep_set_cpus(struct tep_handle *tep, int cpus);
β¨ DESCRIPTION β¨
so, tep_get_cpus() does exactly what it says on the tin β it gets the number of CPUs that have a tracing buffer representing them. the tep argument is ur trace event parser context. that's the whole vibe.
and tep_set_cpus() sets that number. tep is, again, the trace event parser context, and cpu is the number of CPUs with tracing data. classic setter/gutter situation, we love a matched pair π
β¨ RETURN VALUE β¨
tep_get_cpus() returns the number of CPUs that have tracing data recorded. that's it. that's the number. no cap. π
β¨ EXAMPLE β¨
ngl this is the cutest lil snippet, look:
#include <event-parse.h>
...
struct tep_handle *tep = tep_alloc();
...
tep_set_cpus(tep, 5);
...
printf("We have tracing data for %d CPUs", tep_get_cpus(tep));
see how she allocates, sets 5, then asks for it back? main character energy fr fr π
β¨ FILES β¨
event-parse.hβ the header file u gotta include to get access to the library APIs. gatekeeping is over, include her π¦-ltraceeventβ the linker switch to add when building a program that uses the library. do not forget her or she WILL ghost u π
β¨ SEE ALSO β¨
β¨ AUTHOR β¨
- Steven Rostedt
<rostedt@goodmis.org[1]>, author of libtraceevent. legend behaviour. - Tzvetomir Stoyanov
<tz.stoyanov@gmail.com[2]>, author of this man page. also legendary.
β¨ REPORTING BUGS β¨
found a bug? don't suffer in silence bestie, report it to <linux-trace-devel@vger.kernel.org[3]> π
β¨ LICENSE β¨
libtraceevent is Free Software licensed under the GNU LGPL 2.1. periodt. π
β¨ RESOURCES β¨
https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
go look, it's giving source code, it's giving community πΈ
β¨ NOTES β¨
rostedt@goodmis.orgmailto:rostedt@goodmis.orgtz.stoyanov@gmail.commailto:tz.stoyanov@gmail.comlinux-trace-devel@vger.kernel.orgmailto:linux-trace-devel@vger.kernel.org
and that's the whole page babes π this was libtraceevent 1.9.0, dated 06/15/2026 β iykyk. stay tracing, stay iconic, and remember: the buffer may be empty but ur potential never is π β¨π
π¦ 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