Lightweight tracing API, used to extract fine-grained timing information from the RIP. More...
Files | |
file | swtrace.h |
This header file provides access to the Lightweight tracing API. | |
file | swtracegroups.h |
This header file defines the default core trace groups, for the Lightweight tracing API. | |
Data Structures | |
struct | sw_tracegroup_t |
Structure definition for probe control groups. More... | |
Macros | |
#define | SW_TRACENAMES(macro_) |
Core trace names. More... | |
#define | SW_TRACENAME_ENUM(x) SW_TRACE_ ## x, |
Convert a raw symbol to a trace enumeration name. | |
#define | SW_TRACETYPES(macro_) |
Core trace types. More... | |
#define | SW_TRACETYPE_ENUM(x) SW_TRACETYPE_ ## x, |
Convert a raw symbol to a trace type enumeration name. | |
Typedefs | |
typedef void() | SwTraceHandlerFn(int trace_id, int trace_type, intptr_t trace_designator) |
Type definition for the trace handler function. More... | |
typedef struct sw_tracegroup_t | sw_tracegroup_t |
Structure definition for probe control groups. More... | |
Enumerations | |
enum | { SW_TRACE_INVALID , SW_TRACE_CORE , SW_TRACE_THREAD , SW_TRACE_THREAD_CREATE , SW_TRACE_THREAD_JOIN , SW_TRACE_JOB_CONFIG , SW_TRACE_JOB , SW_TRACE_JOB_COMPLETE , SW_TRACE_INTERPRET , SW_TRACE_INTERPRET_LEVEL , SW_TRACE_INTERPRET_PDF , SW_TRACE_INTERPRET_XML , SW_TRACE_INTERPRET_IMAGE , SW_TRACE_INTERPRET_JPEG , SW_TRACE_INTERPRET_TOMSTABLE , SW_TRACE_FONT_CACHE , SW_TRACE_USERPATH_CACHE , SW_TRACE_DL , SW_TRACE_DL_HDL , SW_TRACE_DL_GROUP , SW_TRACE_DL_FILL , SW_TRACE_DL_IMAGE , SW_TRACE_DL_SHFILL , SW_TRACE_DL_OBJECT , SW_TRACE_DL_COMPLETE , SW_TRACE_DL_ERASE , SW_TRACE_COMPOSITE , SW_TRACE_COMPOSITE_BAND , SW_TRACE_COMPOSITE_OBJECT , SW_TRACE_COMPOSITE_ACQUIRE , SW_TRACE_COMPOSITE_HOLD , SW_TRACE_RENDER , SW_TRACE_RENDER_INIT , SW_TRACE_RENDER_INIT_FINAL , SW_TRACE_RENDER_INIT_PARTIAL , SW_TRACE_DL_PREPARE , SW_TRACE_DL_PRECONVERT , SW_TRACE_TRAP_INIT , SW_TRACE_TRAP_ACQUIRE , SW_TRACE_TRAP_HOLD , SW_TRACE_TRAP_SHAPE , SW_TRACE_TRAP_COLOR , SW_TRACE_SHEET_START , SW_TRACE_SHEET_RENDER_DONE , SW_TRACE_SHEET_OUTPUT_DONE , SW_TRACE_SHEET_DONE , SW_TRACE_FRAME_RENDER_START , SW_TRACE_FRAME_RENDER_DONE , SW_TRACE_FRAME_OUTPUT_DONE , SW_TRACE_RENDER_BAND , SW_TRACE_RENDER_HDL , SW_TRACE_RENDER_GROUP , SW_TRACE_RENDER_PATTERN , SW_TRACE_RENDER_OBJECT , SW_TRACE_RENDER_CLIP , SW_TRACE_RENDER_SOFTMASK , SW_TRACE_RENDER_VECTOR , SW_TRACE_RENDER_TEXT , SW_TRACE_RENDER_SHADE , SW_TRACE_RENDER_IMAGE , SW_TRACE_RENDER_BACKDROP , SW_TRACE_RENDER_ERASE , SW_TRACE_RENDER_REGION_MARK , SW_TRACE_COMPRESS_BAND , SW_TRACE_OUTPUT_BAND , SW_TRACE_READBACK_BAND , SW_TRACE_RETAINED_RASTER_CAPTURE , SW_TRACE_PAGEBUFFER , SW_TRACE_PAGEBUFFER_ACQUIRE , SW_TRACE_PAGEBUFFER_HOLD , SW_TRACE_TASK_JOINING , SW_TRACE_TASK_HELPING , SW_TRACE_TASK_JOIN_WAIT , SW_TRACE_TASK_DISPATCH_WAIT , SW_TRACE_TASK_HELPER_WAIT , SW_TRACE_TASK_MEMORY_WAIT , SW_TRACE_THREAD_WAKE , SW_TRACE_THREAD_WAKE_FAIL , SW_TRACE_TASK_ACQUIRE , SW_TRACE_TASK_HOLD , SW_TRACE_TASK_WAIT , SW_TRACE_TASK_MEM_ACQUIRE , SW_TRACE_TASK_MEM_HOLD , SW_TRACE_TASKS_INCOMPLETE , SW_TRACE_TASKS_ALLOCATED , SW_TRACE_TASK_GROUPS_ALLOCATED , SW_TRACE_TASK_GROUP_RESOURCES , SW_TRACE_TASK_GRAPH_WALK , SW_TRACE_THREADS_ACTIVE , SW_TRACE_THREADS_CONSTRAINED , SW_TRACE_TASKS_ACTIVE , SW_TRACE_TASKS_RUNNABLE , SW_TRACE_TASKS_RUNNABLE_HELP , SW_TRACE_TASKS_UNPROVISIONED , SW_TRACE_LINES_COPIED , SW_TRACE_USER , SW_TRACE_PDF_PAGE , SW_TRACE_HANDLING_LOWMEM , SW_TRACE_HANDLING_LOWMEM_WAIT , SW_TRACE_LOWMEM_WAIT , SW_TRACE_LOWMEM_ACQUIRE , SW_TRACE_LOWMEM_HOLD , SW_TRACE_RESERVE_ACQUIRE , SW_TRACE_RESERVE_HOLD , SW_TRACE_IM_GET_WAIT , SW_TRACE_IM_LOAD_WAIT , SW_TRACE_IM_BLOCK_ACQUIRE , SW_TRACE_IM_BLIST_ACQUIRE , SW_TRACE_IM_BLOCK_HOLD , SW_TRACE_IM_BLIST_HOLD , SW_TRACE_IM_STORE_ACQUIRE , SW_TRACE_IM_STORE_HOLD , SW_TRACE_RSD_ACQUIRE , SW_TRACE_RSD_HOLD , SW_TRACE_HT_CACHE_ACQUIRE , SW_TRACE_HT_CACHE_HOLD , SW_TRACE_MONITOR_ACQUIRE , SW_TRACE_MONITOR_HOLD , SW_TRACE_ASYNC_PS_ACQUIRE , SW_TRACE_ASYNC_PS_HOLD , SW_TRACE_COLCVT_ACQUIRE , SW_TRACE_COLCVT_HOLD , SW_TRACE_INPUT_PAGE_ACQUIRE , SW_TRACE_INPUT_PAGE_HOLD , SW_TRACE_OUTPUT_PAGE_ACQUIRE , SW_TRACE_OUTPUT_PAGE_HOLD , SW_TRACE_HT_ACQUIRE , SW_TRACE_HT_READ_HOLD , SW_TRACE_HT_WRITE_HOLD , SW_TRACE_HT_RELEASE , SW_TRACE_HT_FORM_ACQUIRE , SW_TRACE_HT_FORM_HOLD , SW_TRACE_GOURAUD_ACQUIRE , SW_TRACE_GOURAUD_READ_HOLD , SW_TRACE_GOURAUD_WRITE_HOLD , SW_TRACE_GOURAUD_RELEASE , SW_TRACE_POINTLESS_WAKEUPS , SW_TRACE_POINTLESS_TIMEOUTS , SW_TRACE_POINTLESS_GRAPH_WALKS , SW_TRACE_RETAINEDRASTER_ACQUIRE , SW_TRACE_RETAINEDRASTER_HOLD , SW_TRACE_RETAINEDRASTER_WAIT , SW_TRACE_RASTERSTORE_HOLD , SW_TRACE_RASTERSTORE_ACQUIRE , SW_TRACE_RASTERSTORE_SWAP_HOLD , SW_TRACE_RASTERSTORE_SWAP_ACQUIRE , SW_TRACE_RASTERSTORE_WAIT , SW_TRACE_GST_HOLD , SW_TRACE_GST_ACQUIRE , SW_TRACE_COLOR_HOLD , SW_TRACE_COLOR_ACQUIRE , SW_TRACE_RR_PAGE_DEFINE , SW_TRACE_RR_PAGE_READY , SW_TRACE_RR_PAGE_COMPLETE , SW_TRACE_RR_ELEMENT_DEFINE , SW_TRACE_RR_ELEMENT_UNLOCK , SW_TRACE_RR_ELEMENT_PENDING , SW_TRACE_RR_ELEMENT_QUERY_LOCK , SW_TRACE_RR_ELEMENT_UPDATE_RASTER , SW_TRACE_RR_ELEMENT_UPDATE_HITS , SW_TRACE_RR_CONNECT , SW_TRACE_RR_DISCONNECT , SW_TRACE_RR_PREOP , SW_TRACE_RR_HASHOP , SW_TRACE_RR_POSTOP , SW_TRACE_RESOURCE_FIX , SW_TRACE_RESOURCE_UNFIX , SW_TRACE_RESOURCE_DETACH , SW_TRACE_RESOURCE_RETURN , SW_TRACE_RESOURCE_FREE , SW_TRACE_RESOURCE_FIX_YIELD , SW_TRACE_RESOURCE_POOL_SOLICIT , SW_TRACE_RESOURCE_POOL_RELEASE , SW_TRACE_RESOURCE_SET_SOLICIT , SW_TRACE_RESOURCE_SET_RELEASE , SW_TRACE_TASK_GROUP_PROVISION , SW_TRACE_MPS_COMMITTED , SW_TRACE_MHT_GATE , SW_TRACE_MHT_WAIT , SW_TRACE_MHT_ACQUIRE , SW_TRACE_MHT_HOLD , SW_TRACE_RENDER_SPLIT_Y , SW_TRACE_RENDER_SPLIT_X , SW_TRACE_RECOMPUTE_SCHEDULE , SW_TRACE_ON_THE_FLY , SW_TRACE_TRAPCELL_ACQUIRE , SW_TRACE_TRAPCELL_READ_HOLD , SW_TRACE_TRAPCELL_WRITE_HOLD , SW_TRACE_TRAPCELL_RELEASE , SW_TRACE_RENDER_CHAR_BITMAP , SW_TRACE_RENDER_CHAR_RLE , SW_TRACE_BANDSHANDLED_ACQUIRE , SW_TRACE_BANDSHANDLED_HOLD , SW_TRACE_TASKSYS_GROUP_CREATE , SW_TRACE_TASKSYS_GROUP_RELEASE , SW_TRACE_TASKSYS_GROUP_READY , SW_TRACE_TASKSYS_GROUP_CLOSE , SW_TRACE_TASKSYS_GROUP_CANCEL , SW_TRACE_TASKSYS_GROUP_JOIN , SW_TRACE_TASKSYS_GROUP_RESOURCES_SIGNAL , SW_TRACE_TASKSYS_TASK_CREATE , SW_TRACE_TASKSYS_TASK_RELEASE , SW_TRACE_TASKSYS_TASK_EXECUTE , SW_TRACE_TASKSYS_TASK_DEPENDS , SW_TRACE_TASKSYS_TASK_REPLACE , SW_TRACE_TASKSYS_TASK_READY , SW_TRACE_TASKSYS_TASK_ALLOC , SW_TRACE_TASKSYS_SET_JOINER , SW_TRACE_TASKSYS_SPECIALISE , SW_TRACE_TASKSYS_DISPATCH , SW_TRACE_TASKSYS_WAIT_FOR_MEMORY , SW_TRACE_TASKSYS_QUEUE_RELEASE , SW_TRACE_TASKSYS_SET_THREADS , SW_TRACE_TASKSYS_SET_HELPER , SW_TRACE_TASK_STARVE_WHILE_HELP , SW_TRACE_TASK_DISPATCH_WHILE_HELP , SW_TRACE_TASK_PROVISIONING , SW_TRACE_TASK_DEPROVISIONING , SW_TRACE_TASK_HELPER_EXECUTE , SW_TRACE_TASK_HELPER_THRESHOLD , SW_TRACE_TASK_PARTITION_SIZE , SW_TRACE_TASK_ALLOC_WAIT , SW_TRACE_TASK_GROUP_ALLOC_WAIT , CORE_TRACE_N } |
Core trace name enumeration. More... | |
enum | { SW_TRACETYPE_INVALID , SW_TRACETYPE_RESET , SW_TRACETYPE_ENABLE , SW_TRACETYPE_DISABLE , SW_TRACETYPE_ENTER , SW_TRACETYPE_EXIT , SW_TRACETYPE_MARK , SW_TRACETYPE_AMOUNT , SW_TRACETYPE_ADD , SW_TRACETYPE_VALUE , SW_TRACETYPE_OPTION , CORE_TRACETYPE_N } |
Core trace types enumeration. More... | |
enum | { SW_TRACEOPTION_INVALID , SW_TRACEOPTION_AFFINITY = 1 , SW_TRACEOPTION_MARKDATA = 2 , SW_TRACEOPTION_AMOUNTDATA = 4 , SW_TRACEOPTION_TIMELINE = 8 , CORE_TRACEOPTION_NEXT = 16 } |
Core trace option enums. This is not macro-ised, because the values are not stringified; they are used in the designator of a probe. More... | |
Lightweight tracing API, used to extract fine-grained timing information from the RIP.
The timing points are not built into OEM release RIP builds.
#define SW_TRACENAMES | ( | macro_ | ) |
Core trace names.
These are defined using a macro expansion, so the names can be re-used for other purposes (stringification, usage strings) without having core maintainers having to modify every skin which uses the trace facility.
#define SW_TRACETYPES | ( | macro_ | ) |
Core trace types.
These are defined using a macro expansion, so the names can be re-used for other purposes (stringification, usage strings) without having core maintainers having to modify every skin which uses the trace facility.
typedef struct sw_tracegroup_t sw_tracegroup_t |
Structure definition for probe control groups.
The core defines some standard probe control groups, however it is the responsibility of the skin to determine whether and how it will use these groups.
typedef void() SwTraceHandlerFn(int trace_id, int trace_type, intptr_t trace_designator) |
Type definition for the trace handler function.
trace_id | One of the SW_TRACE_* enumeration values, indicating what is being traced. |
trace_type | One of the SW_TRACETYPE_* enumeration values, indicating the type of trace mark this is (e.g., entering a function, exiting, marking an update). |
trace_designator | An opaque value which can be used to correlate related trace events. |
A trace handler function can be provided to the core RIP through the SwStart() parameter list. If tracing functionality is built into the RIP, the trace handler will be called for at each enabled trace point. It is expected to be exceptionally fast, which is why very little information is provided in the trace call. The trace handler should store the information and return to the RIP as fast as possible (i.e., within nanoseconds), without blocking. If trace information cannot be captured without blocking, it should be dropped.
anonymous enum |
anonymous enum |
anonymous enum |
Core trace option enums. This is not macro-ised, because the values are not stringified; they are used in the designator of a probe.