System Trap -
manipulate event probes and lock event tracing.
indicates the desired trace flavor or reset option and may be one,
or more, of the following:
ETAP_CUMULATIVE: cumulative lock event trace mode.
ETAP_MONITORED: monitored event trace mode (for probes or locks)
ETAP_RESET: reset mode, clears all trace status and cumulative buffer entries
used when measuring lock event contention or durations
and may be one, or more, of the following:
a boolean value indicattin whether the event trace operation is
to be enabled (TRUE) or disabled (FALSE).
specifies how many arguments are passed in the args array.
an array, each element of which is a character string
representing a specific subsystem or event type. These values must
correspond to the ones the kernel uses to represent the same
subsystems and event types. The maximum length of a character string
is EVENT_NAME_LENGTH (defined in mach/etap.h).
The etap_trace_event system call is used to enable
and disable kernel event probes (of a specified type) and all modes of lock event
tracing. The call also supports a reset option, where the cumulative
buffer data and all event type tracing is reset to zero. When the
reset option is used, a new interval width can also be defined, using
the nargs parameter.
To reset the ETAP instrumentation,
the system call would utilize the mode parameter, passing the value of
ETAP_RESET (All other parameters may equal NULL). If, at the time of
reset, the nargs parameter is assigned a value, then the
cumulative buffer interval width will be adjusted to be the size of
that value. For example, the following system call would reset the
ETAP instrumentation and adjust the cumulative buffer's interval width
etap_trace_event(ETAP_RESET, 0, 0, 100, 0);
The call was performed successfully.
A shortage of kernel resources prevented the operation from completing;
the kernel has cleaned up all residual state (the error indicates a "clean"
ETAP is not configured in the kernel.