Trace subroutines
This section describes the trace subroutines and the different tracing roles they support.
The trace interface is built and structured to improve portability by using trace data of opaque type.
To set up and customize resources for a trace controller process
to run a trace stream, use the subroutines in the following table.
Subroutine | Purpose |
---|---|
posix_trace_attr_init | Initializes attributes |
posix_trace_attr_destroy | Destroys attributes |
posix_trace_attr_getgenversion | Gets the version of a trace stream |
posix_trace_attr_getname | Gets the trace name |
posix_trace_attr_setname | Sets the trace name |
posix_trace_attr_getinherited | Gets the inheritance policy of a trace stream |
posix_trace_attr_setinherited | Sets the inheritance policy of a trace stream |
posix_trace_attr_setstreamfullpolicy | Sets the stream full policy |
posix_trace_attr_getstreamfullpolicy | Gets the stream full policy |
posix_trace_attr_setlogfullpolicy | Sets the log full policy of a trace stream |
posix_trace_attr_getlogfullpolicy | Gets the log full policy of a trace stream |
posix_trace_attr_setlogsize | Sets the size of the log of a trace stream |
posix_trace_attr_setmaxdatasize | Sets the maximum size of the user trace event data |
posix_trace_attr_setstreamsize | Sets the size of a trace stream |
posix_trace_attr_getmaxusereventsize | Gets the maximum size of an user event for a given length |
posix_trace_create | Creates an active trace stream |
posix_trace_create_withlog | Creates an active trace stream and associates it with a trace log |
posix_trace_flush | Copies the content of a trace stream into the associated trace log of the trace stream |
posix_trace_shutdown | Shuts down a trace stream |
posix_trace_clear | Clears a trace stream and a trace log |
posix_trace_trid_eventid_open | Associates a trace event type identifier to a user trace event name |
posix_trace_eventid_equal | Compares two trace event type identifiers |
posix_trace_eventid_get_name | Retrieves the trace event name from a trace event type identifier |
posix_trace_eventtypelist_getnext_id, posix_trace_eventtypelist_rewind | Iterate over a mapping of trace event types |
posix_trace_eventset_add | Adds a trace event type in a trace event type set |
posix_trace_eventset_empty | Empties a trace event type set |
posix_trace_eventset_del | Deletes a trace event type from a trace event type set |
posix_trace_eventset_fill | Fills in a trace event type set |
posix_trace_eventset_ismember | Tests if the trace event type is included in the trace event type set |
posix_trace_get_filter | Gets the filter of an initialized trace stream |
posix_trace_set_filter | Sets the filter of an initialized trace stream |
posix_trace_start | Starts a trace stream |
posix_trace_stop | Stops a trace stream |
posix_trace_get_attr | Reads trace stream information |
posix_trace_get_status | Gets trace attributes or trace status |
To set trace point for a traced process, use the posix_trace_event and posix_trace_eventid_open subroutines. These subroutines define identifiers of trace event types and insert trace points.
The following table shows the subroutines that retrieve information
from a trace stream and trace log for a trace analyzer process.
Subroutine | Purpose |
---|---|
posix_trace_attr_getname | Gets the trace name |
posix_trace_attr_getgenversion | Reads identification information |
posix_trace_attr_getcreatetime | Gets the creation time of a trace stream |
posix_trace_attr_getinherited | Gets the inheritance policy of a trace stream |
posix_trace_attr_getstreamfullpolicy | Gets the stream full policy |
posix_trace_attr_getlogfullpolicy | Gets the log full policy of a trace stream |
posix_trace_attr_getmaxusereventsize | Gets the maximum size of an user event for a given length |
posix_trace_attr_getmaxsystemeventsize | Gets the maximum size of a system trace event |
posix_trace_attr_getlogsize | Gets the size of the log of a trace stream |
posix_trace_attr_getmaxdatasize | Gets the maximum size of user trace event data |
posix_trace_attr_getstreamsize | Gets the size of a trace stream |
posix_trace_trid_eventid_open | Associates a trace event type identifier to a user trace event name |
posix_trace_eventid_equal | Compares two trace event type identifiers |
posix_trace_eventid_get_name | Gets the trace event name from a trace event type identifier |
posix_trace_eventtypelist_getnext_id, posix_trace_eventtypelist_rewind | Iterate over a mapping of trace event types |
posix_trace_open | Opens a trace log |
posix_trace_close | Closes a trace log |
posix_trace_rewind | Re-initializes a trace log for reading |
posix_trace_get_attr | Reads the information of a trace stream |
posix_trace_get_status | Reads the status of a trace stream |
posix_trace_getnext_event | Reads a trace event |
posix_trace_timedgetnext_event, posix_trace_trygetnext_event | Gets a trace event |