The interfaces to control kernel tracing and process filtering are used only with kernel handles, handles created by tnfctl_kernel_open(3TNF). These interfaces are used to change the tracing and filter states for kernel tracing.
tnfctl_trace_state_set() sets the kernel global tracing state to "on" if trace_state is B_TRUE, or to "off"
if trace_state is B_FALSE. For the kernel, trace_state is off by default. Probes that are enabled will
not write out data unless this state is on. Use tnfctl_trace_attrs_get(3TNF)
to retrieve the current tracing state.
tnfctl_filter_state_set() sets the kernel process filtering state to "on" if filter_state is B_TRUE, or to "off"
if filter_state is B_FALSE. filter_state is off by default. If it is on, only probe points encountered by
processes in the process filter set by tnfctl_filter_list_add() will generate trace points. Use tnfctl_trace_attrs_get(3TNF) to retrieve the current process filtering state.
tnfctl_filter_list_get() returns the process filter list as an array in pid_list. The count of elements in the process filter list is returned in pid_count. The caller should use free(3C) to free
memory allocated for the array pid_list.
tnfctl_filter_list_add() adds pid_to_add to the process filter list. The process filter list is maintained even when the process filtering state is
off, but it has no effect unless the process filtering state is on.
tnfctl_filter_list_delete() deletes pid_to_delete from the process filter list. It returns an error if the process does not exist or is not in the filter
list.
|