![]() |
![]() |
Data Structures | |
| struct | GT_Mask |
| Object representing a GT module instance. More... | |
| struct | GT_Mask |
| Object representing a GT module instance. More... | |
Defines | |
| #define | GT_ENTER ((UInt8)0x01) |
| Mask for tracing entry and exit points within functions. | |
| #define | GT_1CLASS ((UInt8)0x02) |
| #define | GT_2CLASS ((UInt8)0x04) |
| #define | GT_3CLASS ((UInt8)0x08) |
| #define | GT_4CLASS ((UInt8)0x10) |
| #define | GT_5CLASS ((UInt8)0x20) |
| User mask 5. By convention, used for benchmarking related tracing. | |
| #define | GT_6CLASS ((UInt8)0x40) |
| User mask 6. By convention, used for internal warning related tracing. | |
| #define | GT_7CLASS ((UInt8)0x80) |
| User mask 7. By convention, used for internal error related tracing. | |
| #define | GT_create(mask, modName) _GT_create((mask), (modName)) |
| #define | GT_set(str) _GT_set(str) |
| #define | GT_0trace(mask, classId, format) |
| #define | GT_1trace(mask, classId, format, arg1) |
| #define | GT_2trace(mask, classId, format, arg1, arg2) |
| #define | GT_3trace(mask, classId, format, arg1, arg2, arg3) |
| #define | GT_4trace(mask, classId, format, arg1, arg2, arg3, arg4) |
| #define | GT_5trace(mask, classId, format, arg1, arg2, arg3, arg4, arg5) |
| #define | GT_6trace(mask, classId, format, arg1, arg2, arg3, arg4, arg5, arg6) |
Functions | |
| Void | _GT_create (GT_Mask *mask, String modName) |
| Initialize a GT mask. | |
| Void | GT_init (Void) |
| Initialize the GT module. | |
| Void | _GT_set (String str) |
| Modify the current trace mask settings. | |
| Int | _GT_trace (GT_Mask *mask, Int classId, String format,...) |
| Conditionally emit a trace statement. | |
| #define GT_ENTER ((UInt8)0x01) |
Mask for tracing entry and exit points within functions.
| #define GT_1CLASS ((UInt8)0x02) |
User mask 1.
| #define GT_2CLASS ((UInt8)0x04) |
User mask 2.
| #define GT_3CLASS ((UInt8)0x08) |
User mask 3.
| #define GT_4CLASS ((UInt8)0x10) |
User mask 4.
| #define GT_5CLASS ((UInt8)0x20) |
User mask 5. By convention, used for benchmarking related tracing.
| #define GT_6CLASS ((UInt8)0x40) |
User mask 6. By convention, used for internal warning related tracing.
| #define GT_7CLASS ((UInt8)0x80) |
User mask 7. By convention, used for internal error related tracing.
| #define GT_create | ( | mask, | |||
| modName | ) | _GT_create((mask), (modName)) |
Initialize a GT mask.
| [in] | mask | Address of an existing GT_Mask structure. |
| [in] | modName | Module name to be associated with this mask. |
mask must point to a pre-allocated GT_Mask structure. Typically this memory is set aside as a static global variable for simplicity, althought that need not be the case.
modName must be unique within the entire system. To that end, it typically contains the client package's name.
| #define GT_set | ( | str | ) | _GT_set(str) |
| #define GT_0trace | ( | mask, | |||
| classId, | |||||
| format | ) |
Value:
((*(mask).flags & (classId)) ? \
_GT_trace(&(mask), (classId), (format)) : 0)
| #define GT_1trace | ( | mask, | |||
| classId, | |||||
| format, | |||||
| arg1 | ) |
Value:
((*(mask).flags & (classId)) ? \
_GT_trace(&(mask), (classId), (format), (arg1)) : 0)
| #define GT_2trace | ( | mask, | |||
| classId, | |||||
| format, | |||||
| arg1, | |||||
| arg2 | ) |
Value:
((*(mask).flags & (classId)) ? \
_GT_trace(&(mask), (classId), (format), (arg1), (arg2)) : 0)
| #define GT_3trace | ( | mask, | |||
| classId, | |||||
| format, | |||||
| arg1, | |||||
| arg2, | |||||
| arg3 | ) |
Value:
((*(mask).flags & (classId)) ? \
_GT_trace(&(mask), (classId), (format), (arg1), (arg2), (arg3)) : 0)
| #define GT_4trace | ( | mask, | |||
| classId, | |||||
| format, | |||||
| arg1, | |||||
| arg2, | |||||
| arg3, | |||||
| arg4 | ) |
Value:
((*(mask).flags & (classId)) ? \
_GT_trace(&(mask), (classId), (format), (arg1), (arg2), (arg3), (arg4)) : 0)
| #define GT_5trace | ( | mask, | |||
| classId, | |||||
| format, | |||||
| arg1, | |||||
| arg2, | |||||
| arg3, | |||||
| arg4, | |||||
| arg5 | ) |
Value:
((*(mask).flags & (classId)) ? \
_GT_trace(&(mask), (classId), (format), (arg1), (arg2), (arg3), (arg4), (arg5)) : 0)
| #define GT_6trace | ( | mask, | |||
| classId, | |||||
| format, | |||||
| arg1, | |||||
| arg2, | |||||
| arg3, | |||||
| arg4, | |||||
| arg5, | |||||
| arg6 | ) |
Value:
((*(mask).flags & (classId)) ? \
_GT_trace(&(mask), (classId), (format), (arg1), (arg2), (arg3), (arg4), \
(arg5), (arg6)) : 0)
| Void _GT_create | ( | GT_Mask * | mask, | |
| String | modName | |||
| ) |
Initialize a GT mask.
| [in] | mask | Address of an existing GT_Mask structure. |
| [in] | modName | Module name to be associated with this mask. |
mask must point to a pre-allocated GT_Mask structure. Typically this memory is set aside as a static global variable for simplicity, althought that need not be the case.
modName must be unique within the entire system. To that end, it typically contains the client package's name.
| Void GT_init | ( | Void | ) |
Initialize the GT module.
| Void _GT_set | ( | String | str | ) |
| Int _GT_trace | ( | GT_Mask * | mask, | |
| Int | classId, | |||
| String | format, | |||
| ... | ||||
| ) |
Conditionally emit a trace statement.
| [in] | mask | Mask associated with this trace statement. |
| [in] | classId | class of this trace statement. |
| [in] | format | printf-style format string. |
classId can be a logically OR'd set of classes. Doing so will cause the trace to be emitted if any of the classId classes are enabled in the current settings of the mask.
Most, but not all printf format strings are supported.
mask must have been initialized with GT_create().