|
tnfctl_buffer_alloc() allocates a buffer to which trace events are logged. When tracing a process using a tnfctl handle returned by tnfctl_pid_open(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), and tnfctl_internal_open(3TNF)), trace_file_name is the name
of the trace file to which trace events should be logged. It can be an absolute path specification or a relative path specification. If it is relative, the current working directory of the process that
is calling tnfctl_buffer_alloc() is prefixed to trace_file_name. If the named trace file already exists, it is overwritten. For kernel tracing, that is, for
a tnfctl handle returned by tnfctl_kernel_open(3TNF), trace events are logged
to a trace buffer in memory; therefore, trace_file_name is ignored. Use tnfxtract(1) to extract a kernel buffer into a file.
trace_buffer_size is the size in bytes of the trace buffer that should be allocated. An error is returned if an attempt is made to allocate a buffer when one already exists.
tnfctl_buffer_alloc() affects the trace attributes; use tnfctl_trace_attrs_get(3TNF) to get the latest trace attributes after a buffer is allocated.
tnfctl_buffer_dealloc() is used to deallocate a kernel trace buffer that is no longer needed. hndl must be a kernel handle, returned by tnfctl_kernel_open(3TNF). A process's trace file cannot be deallocated using tnfctl_buffer_dealloc(). Instead,
once the trace file is no longer needed for analysis and after the process being traced exits, use rm(1) to remove the trace file. Do not remove the trace file while the process being traced is still alive. tnfctl_buffer_dealloc () affects the trace attributes;
use tnfctl_trace_attrs_get(3TNF) to get the latest trace attributes after
a buffer is deallocated.
For a complete discussion of tnf tracing, see tracing(3TNF).
|