TNF Library Functions tnfctltracestateset(3TNF)
NAME
tnfctltracestateset, tnfctlfilterstateset,
tnfctlfilterlistget, tnfctlfilterlistadd,
tnfctlfilterlistdelete - control kernel tracing and pro-
cess filtering
SYNOPSIS
cc [ flag ... ] file ... -ltnfctl [ library ... ]
#include
tnfctlerrcodet tnfctltracestateset(tnfctlhandlet *hndl,
booleant tracestate);
tnfctlerrcodet tnfctlfilterstateset(tnfctlhandlet *hndl,
booleant filterstate);
tnfctlerrcodet tnfctlfilterlistget(tnfctlhandlet *hndl,
pidt **pidlist, int *pidcount);
tnfctlerrcodet tnfctlfilterlistadd(tnfctlhandlet *hndl,
pidt pidtoadd);
tnfctlerrcodet tnfctlfilterlistdelete(tnfctlhandlet *hndl,
pidt pidtodelete);
DESCRIPTION
The interfaces to control kernel tracing and process filter-
ing are used only with kernel handles, handles created by
tnfctlkernelopen(3TNF). These interfaces are used to
change the tracing and filter states for kernel tracing.
tnfctltracestateset() sets the kernel global tracing
state to "on" if tracestate is BTRUE, or to "off" if
tracestate is BFALSE. For the kernel, tracestate is off
by default.Probes that are enabled will not write out data
unless this state is on. Use tnfctltraceattrsget(3TNF) to
retrieve the current tracing state.
tnfctlfilterstateset() sets the kernel process filtering
state to "on" if filterstate is BTRUE, or to "off" if
filterstate is BFALSE. filterstate is off by default. If
it is on, only probe points encountered by processes in the
process filter set by tnfctlfilterlistadd() will generate
trace points. Use tnfctltraceattrsget(3TNF) to retrieve
the current process filtering state.
SunOS 5.11 Last change: 4 Mar 1997 1
TNF Library Functions tnfctltracestateset(3TNF)
tnfctlfilterlistget() returns the process filter list as
an array in pidlist. The count of elements in the process
filter list is returned in pidcount. The caller should use
free(3C) to free memory allocated for the array pidlist.
tnfctlfilterlistadd() adds pidtoadd 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.
tnfctlfilterlistdelete() deletes pidtodelete from the
process filter list. It returns an error if the process
does not exist or is not in the filter list.
RETURN VALUES
The interfaces tnfctltracestateset(),
tnfctlfilterstateset(), tnfctlfilterlistadd(),
tnfctlfilterlistdelete(), and tnfctlfilterlistget()
return TNFCTLERNONE upon success.
ERORS
The following error codes apply to tnfctltracestateset:
TNFCTLERBADARG The handle is not a kernel handle.
TNFCTLERNOBUF Cannot turn on tracing without a
buffer being allocated.
TNFCTLERBUFBROKEN Tracing is broken in the target.
TNFCTLERINTERNAL An internal error occurred.
The following error codes apply to tnfctlfilterstateset:
TNFCTLERBADARG The handle is not a kernel handle.
TNFCTLERINTERNAL An internal error occurred.
The following error codes apply to tnfctlfilterlistadd:
TNFCTLERBADARG The handle is not a kernel handle.
SunOS 5.11 Last change: 4 Mar 1997 2
TNF Library Functions tnfctltracestateset(3TNF)
TNFCTLERNOPROCES No such process exists.
TNFCTLERALOCFAIL A memory allocation failure
occurred.
TNFCTLERINTERNAL An internal error occurred.
The following error codes apply to
tnfctlfilterlistdelete:
TNFCTLERBADARG The handle is not a kernel handle.
TNFCTLERNOPROCES No such process exists.
TNFCTLERINTERNAL An internal error occurred.
The following error codes apply to tnfctlfilterlistget:
TNFCTLERBADARG The handle is not a kernel handle.
TNFCTLERALOCFAIL A memory allocation failure
occurred.
TNFCTLERINTERNAL An internal error occurred.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 4 Mar 1997 3
TNF Library Functions tnfctltracestateset(3TNF)
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWtnfc
MT Level MT-Safe
SEE ALSO
prex(1), TNFPROBE(3TNF), free(3C), libtnfctl(3TNF),
tnfctlkernelopen(3TNF), tnfctltraceattrsget(3TNF),
tracing(3TNF), tnfkernelprobes(4), attributes(5)
SunOS 5.11 Last change: 4 Mar 1997 4
|