TRC_query
Application Program Interface
2-471
C Interface
Syntax
result = TRC_query(mask);
Parameters
Uns
mask;
/* trace type constant mask */
Return Value
Int
result
/* indicates whether all trace types enabled */
Reentrant
yes
Description
TRC_query determines whether particular trace types are enabled.
TRC_query returns 0 if all trace types in the mask are enabled. If any
trace types in the mask are disabled, TRC_query returns a value with a
bit set for each trace type in the mask that is disabled. (See the TRC
Module topic for a list of constants to use in the mask.)
Trace types are specified with a 16-bit mask. The full list of constants you
can use is included in the description of the TRC module.
For example, the following C code returns 0 if statistics tracing for the
PRD class is enabled:
result = TRC_query(TRC_STSPRD);
The following C code returns 0 if both logging and statistics tracing for the
SWI class are enabled:
result = TRC_query(TRC_LOGSWI | TRC_STSSWI);
Note that TRC_query does not return 0 unless the bits you are querying
and the TRC_GBLHOST and TRC_GBLTARG bits are set. TRC_query
returns non-zero if either TRC_GBLHOST or TRC_GBLTARG are
disabled. This is because no tracing is done unless these bits are set.
For example, if the TRC_GBLHOST, TRC_GBLTARG, and
TRC_LOGSWI bits are set, this C code returns the results shown:
result = TRC_query(TRC_LOGSWI); /* returns 0 */
result = TRC_query(TRC_LOGPRD); /* returns non-zero */
However, if only the TRC_GBLHOST and TRC_LOGSWI bits are set, the
same C code returns the results shown:
result = TRC_query(TRC_LOGSWI); /* returns non-zero */
result = TRC_query(TRC_LOGPRD); /* returns non-zero */
See Also
TRC_query
Query trace class(es)