trace.h(7POSIX)
πΈ PROLOG πΈ
okay bestie, real talk before we even start: this page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ β so go check the corresponding Linux manual page for the deets on Linux behavior. or honestly? the interface might not even be implemented on Linux at all. vibe check accordingly. π
β¨ NAME β¨
trace.h β tracing. that's it, that's the whole name. iconic. π
π SYNOPSIS π
#include <trace.h>
π¦ DESCRIPTION π¦
so the <trace.h> header shall define the posix_trace_event_info structure, and it's gonna include at least these members:
trace_event_id_t posix_event_id
pid_t posix_pid
void *posix_prog_address
pthread_t posix_thread_id
struct timespec posix_timestamp
int posix_truncation_status
and the <trace.h> header shall also define the posix_trace_status_info structure, which shall include at least these members:
int posix_stream_full_status
int posix_stream_overrun_status
int posix_stream_status
int posix_log_full_status
int posix_log_overrun_status
int posix_stream_flush_error
int posix_stream_flush_status
and now⦠the constants. the header shall define the following symbolic constants, and yes we're listing all of them, every single one, no skips, no cap:
POSIX_TRACE_ALL_EVENTSPOSIX_TRACE_APPENDPOSIX_TRACE_CLOSE_FOR_CHILDPOSIX_TRACE_FILTERPOSIX_TRACE_FLUSHPOSIX_TRACE_FLUSH_STARTPOSIX_TRACE_FLUSH_STOPPOSIX_TRACE_FLUSHINGPOSIX_TRACE_FULLPOSIX_TRACE_LOOPPOSIX_TRACE_NO_OVERRUNPOSIX_TRACE_NOT_FLUSHINGPOSIX_TRACE_NOT_FULLPOSIX_TRACE_INHERITEDPOSIX_TRACE_NOT_TRUNCATEDPOSIX_TRACE_OVERFLOWPOSIX_TRACE_OVERRUNPOSIX_TRACE_RESUMEPOSIX_TRACE_RUNNINGPOSIX_TRACE_STARTPOSIX_TRACE_STOPPOSIX_TRACE_SUSPENDEDPOSIX_TRACE_SYSTEM_EVENTSPOSIX_TRACE_TRUNCATED_READPOSIX_TRACE_TRUNCATED_RECORDPOSIX_TRACE_UNNAMED_USER_EVENTPOSIX_TRACE_UNTIL_FULLPOSIX_TRACE_WOPID_EVENTS
π twenty-eight of them, we counted, we love a complete list π
the <trace.h> header shall define the size_t, trace_attr_t, trace_event_id_t, trace_event_set_t, and trace_id_t types as described in <sys/types.h>.
now the functions π«Ά β the following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided. presenting, in order, verbatim:
int posix_trace_attr_destroy(trace_attr_t *);
int posix_trace_attr_getclockres(const trace_attr_t *,
struct timespec *);
int posix_trace_attr_getcreatetime(const trace_attr_t *,
struct timespec *);
int posix_trace_attr_getgenversion(const trace_attr_t *, char *);
int posix_trace_attr_getinherited(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getlogsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxsystemeventsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxusereventsize(const trace_attr_t *restrict,
size_t, size_t *restrict);
int posix_trace_attr_getname(const trace_attr_t *, char *);
int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getstreamsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_init(trace_attr_t *);
int posix_trace_attr_setinherited(trace_attr_t *, int);
int posix_trace_attr_setlogfullpolicy(trace_attr_t *, int);
int posix_trace_attr_setlogsize(trace_attr_t *, size_t);
int posix_trace_attr_setmaxdatasize(trace_attr_t *, size_t);
int posix_trace_attr_setname(trace_attr_t *, const char *);
int posix_trace_attr_setstreamfullpolicy(trace_attr_t *, int);
int posix_trace_attr_setstreamsize(trace_attr_t *, size_t);
int posix_trace_clear(trace_id_t);
int posix_trace_close(trace_id_t);
int posix_trace_create(pid_t, const trace_attr_t *restrict,
trace_id_t *restrict);
int posix_trace_create_withlog(pid_t, const trace_attr_t *restrict,
int, trace_id_t *restrict);
void posix_trace_event(trace_event_id_t, const void *restrict, size_t);
int posix_trace_eventid_equal(trace_id_t, trace_event_id_t,
trace_event_id_t);
int posix_trace_eventid_get_name(trace_id_t, trace_event_id_t, char *);
int posix_trace_eventid_open(const char *restrict,
trace_event_id_t *restrict);
int posix_trace_eventset_add(trace_event_id_t, trace_event_set_t *);
int posix_trace_eventset_del(trace_event_id_t, trace_event_set_t *);
int posix_trace_eventset_empty(trace_event_set_t *);
int posix_trace_eventset_fill(trace_event_set_t *, int);
int posix_trace_eventset_ismember(trace_event_id_t,
const trace_event_set_t *restrict, int *restrict);
int posix_trace_eventtypelist_getnext_id(trace_id_t,
trace_event_id_t *restrict, int *restrict);
int posix_trace_eventtypelist_rewind(trace_id_t);
int posix_trace_flush(trace_id_t);
int posix_trace_get_attr(trace_id_t, trace_attr_t *);
int posix_trace_get_filter(trace_id_t, trace_event_set_t *);
int posix_trace_get_status(trace_id_t,
struct posix_trace_status_info *);
int posix_trace_getnext_event(trace_id_t,
struct posix_trace_event_info *restrict, void *restrict,
size_t, size_t *restrict, int *restrict);
int posix_trace_open(int, trace_id_t *);
int posix_trace_rewind(trace_id_t);
int posix_trace_set_filter(trace_id_t, const trace_event_set_t *, int);
int posix_trace_shutdown(trace_id_t);
int posix_trace_start(trace_id_t);
int posix_trace_stop(trace_id_t);
int posix_trace_timedgetnext_event(trace_id_t,
struct posix_trace_event_info *restrict, void *restrict,
size_t, size_t *restrict, int *restrict,
const struct timespec *restrict);
int posix_trace_trid_eventid_open(trace_id_t, const char *restrict,
trace_event_id_t *restrict);
int posix_trace_trygetnext_event(trace_id_t,
struct posix_trace_event_info *restrict, void *restrict, size_t,
size_t *restrict, int *restrict);
the following sections are informative. iykyk. π
π APPLICATION USAGE π
None.
likeβ¦ nothing. empty. a void. but we respect it. π
π RATIONALE π
None.
again, nothing bestie. not every story needs a why. π§
β FUTURE DIRECTIONS β
the <trace.h> header may be removed in a future version. soβ¦ enjoy it while it lasts, i guess? it's giving limited edition. π
π₯ SEE ALSO π₯
<sys_types.h>
the System Interfaces volume of POSIX.1β2017, Section 2.11, Tracing, plus these whole entire functions:
posix_trace_attr_destroy()posix_trace_attr_getclockres()posix_trace_attr_getinherited()posix_trace_attr_getlogsize()posix_trace_clear()posix_trace_close()posix_trace_create()posix_trace_event()posix_trace_eventid_equal()posix_trace_eventset_add()posix_trace_eventtypelist_getnext_id()posix_trace_get_attr()posix_trace_get_filter()posix_trace_getnext_event()posix_trace_start()
π COPYRIGHT π
portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page bestie π«Ά this one came to you from IEEE/The Open Group, dated 2017, and it's the trace.h(7POSIX) page from the POSIX Programmer's Manual. mwah. slay. periodt. πβ¨π
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms