posix_trace_flush(3) - Linux man page
Prolog
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.Name
posix_trace_create, posix_trace_create_withlog, posix_trace_flush, posix_trace_shutdown - trace stream initialization, flush, and shutdown from a process (TRACING)Synopsis
#include <sys/types.h>
#include <trace.h>
int posix_trace_create(pid_t pid,
const trace_attr_t *restrict attr,
trace_id_t *restrict
trid);
int posix_trace_create_withlog(pid_t pid,
const trace_attr_t *restrict attr, int file_desc,
trace_id_t *restrict trid);
int posix_trace_flush(trace_id_t trid);
int posix_trace_shutdown(trace_id_t trid);
Description
The posix_trace_create() function shall create an active trace stream. It allocates all the resources needed by the trace stream being created for tracing the process specified by pid in accordance with the attr argument. The attr argument represents the initial attributes of the trace stream and shall have been initialized by the function posix_trace_attr_init() prior to the posix_trace_create() call. If the argument attr is NULL, the default attributes shall be used. The attr attributes object shall be manipulated through a set of functions described in the posix_trace_attr family of functions. If the attributes of the object pointed to by attr are modified later, the attributes of the trace stream shall not be affected. The creation-time attribute of the newly created trace stream shall be set to the value of the system clock, if the Timers option is not supported, or to the value of the CLOCK_REALTIME clock, if the Timers option is supported.
The pid argument represents the target process to be traced. If the process executing this function does not have appropriate privileges to trace the process identified by pid, an error shall be returned. If the pid argument is zero, the calling process shall be traced.
The posix_trace_create() function shall store the trace stream identifier of the new trace stream in the object pointed to by the trid argument. This trace stream identifier shall be used in subsequent calls to control tracing. The trid argument may only be used by the following functions:
| posix_trace_clear() |
If the Trace Event Filter option is supported, the following additional functions may use the trid argument:
| posix_trace_clear() |
Return Value
Errors
- EAGAIN
| In particular, notice that the operations normally used by a trace |
- EINTR
-
- EINVAL
-
- ENOMEM
-
- EPERM
-
- ESRCH
-
- EBADF
- EINVAL
-
- ENOSPC
-
- EINVAL
- EFBIG
-
- ENOSPC
-
Examples
Application Usage
Rationale
Future Directions
See Also
Copyright
| In particular, notice that the operations normally used by a trace |