|
|
NVIDIA DriveOS Linux SDK API Reference
|
7.2.5.0 Early Access Release
|
Go to the documentation of this file.
30 #ifndef STM_LOGGING_H_
31 #define STM_LOGGING_H_
34 #define STM_API __attribute__((visibility("default")))
53 #define STM_RESOURCE_NAME_MAX (41)
55 #define STM_MAX_SCHEDULES (8)
60 typedef enum __attribute__((__packed__)) {
147 typedef enum __attribute__((__packed__)) {
440 #endif // STM_LOGGING_H_
A singular perfInfo event.
stmElementOptionalVal optVal
Optional value (provides additional context depending on event, eg, which runnables' start/end is bei...
@ STM_EVENT_RUNNABLE_END
Event logged when a CPU runnable ends.
@ STM_EVENT_MAX
Max log value.
uint64_t stmElementTimestamp
@ stmClock_DGPU
Dedicated GPU clock.
@ STM_EVENT_THREAD_START
Event to collect active thread start time.
stmEventType_t logEventId
Type of event being logged.
@ STM_EVENT_NV2DSUB_OVERHEAD
Event to collect runtime overhead for NV2DSUB STM command.
@ SCHED_CALLBACK_START
Rollover schedule switch callback start timestamp.
@ STM_EVENT_FENCE_TIMESTAMP_CF
Event logged when a fence is signaled.
stmEventType_t logEventId
Type of event being logged.
uint32_t frame
Hyperepoch frame where event occurred.
stmClockInfo_t logClkSource
Clock source from which time has been obtained.
stmPerformanceEvent_t
Type of event being logged for STM_EVENT_PERFORMANCE events.
@ STM_EVENT_RUNNABLE_START
Event logged when a CPU runnable starts.
int(* stmLoggingPerfInfoCallback_t)(void *userdata, stmPerfInfo_t *buf, size_t size)
Function signature for perfInfo log Callbacks.
@ INIT_MEMORY_OVERHEAD
STM master init memory overhead.
Return/error codes for all STM functions.
@ stmClock_HW
Timestamp Counter.
@ LOGGER_SETUP_TIME_STOP
STM master logger setup done.
@ STM_EVENT_EXECUTION_END
End of hyperepoch frame.
uint16_t scheduleId
Schedule ID.
@ STM_EVENT_NV2DF_OVERHEAD
Event to collect runtime overhead for NV2DF STM command.
@ stmClock_THREAD_CPU
Thread-specific CPU clock.
STM_API stmErrorCode_t stmLoggerInit(stmHeaderInfo_t *header)
Initialize STM logger context.
STM_API stmErrorCode_t stmRegisterPerfInfoCallBack(stmLoggingPerfInfoCallback_t func, void *userdata)
Registers a callback function with the Logger to be invoked during a perfInfo buffer write.
int(* stmLoggingStateCallback_t)(void *userdata, stmStateInfo_t *buf, size_t size)
Function signature for STM state manager log callbacks.
@ STM_EVENT_PERFORMANCE
Performance profiling related info.
@ STM_EVENT_CUF_OVERHEAD
Event to collect runtime overhead for CUF STM command.
@ MANAGED_CLIENT_SPAWN_START
STM master launching managed clients start.
@ STM_EVENT_FENCE_TIMESTAMP_SF
Event logged for engine (GPU only) fences before the start of the engine submittee.
stmElementTimestamp logTime
Time when event occurred.
uint16_t scheduleId
Schedule ID.
@ MANAGED_CLIENT_SPAWN_STOP
STM master launching managed clients stop.
@ INIT_TIME_DONE
STM master init completion timestamp.
@ SCHED_START_INIT
Complete schedule switch init start timestamp.
stmEventType_t
Types of Events logged by STM.
@ SCHED_STOP_INIT
Complete schedule switch stop start timestamp.
@ ARG_PARSING_TIME_DONE
STM master commandline parsing completion timestamp.
#define STM_RESOURCE_NAME_MAX
@ STM_EVENT_TIMESTAMP_COLLECTION_OVERHEAD
Event to collect runtime overhead for engine fence timestamps.
@ SCHED_ROLLOVER_INIT
Rollover schedule switch init start timestamp.
uint16_t stmElementOptionalVal
uint16_t scheduleId
Schedule ID.
@ SYNC_TIME_START
STM master sync server setup start timestamp.
@ SCHED_PARSING_TIME_START
STM master schedule parsing start timestamp.
uint16_t optVal2
Optional value 2 (e.g.
stmClockInfo_t logClkSource
Clock source from which time has been obtained.
@ SCHED_STOP_DONE
Complete schedule switch stop completion timestamp.
@ STM_EVENT_CLIENT_CRASH
Connected client crashed [Deprecated].
#define STM_MAX_SCHEDULES
STM_API stmErrorCode_t stmLoggerInitWithDiscriminator(int32_t discriminator, stmHeaderInfo_t *header)
Initialize STM logger context with a discriminator.
stmClockInfo_t
Types of Clocks used by STM.
@ SCHED_START_DONE
Complete schedule switch init completion timestamp.
@ STM_EVENT_CLIENT_CONNECT
Client connected [Deprecated].
@ STM_EVENT_CLIENT_DISCONNECT
Client disconnected [Deprecated].
@ STM_EVENT_CUDLASUB_OVERHEAD
Event to collect runtime overhead for CUDLASUB STM command.
@ STM_EVENT_CUDLAF_OVERHEAD
Event to collect runtime overhead for CUDLAF STM command.
uint16_t optVal
Optional value (provides additional context depending on event)
@ SYNC_MEMORY_OVERHEAD
STM master sync server memory overhead.
@ STM_EVENT_EXECUTION_START
Start of hyperepoch frame.
@ stmClock_REALTIME
Real time Counter.
STM_API stmErrorCode_t stmEnterLoggingLoop()
Enters logging loop which logs at a set frequency.
@ STM_EVENT_FRAME_SKIPPED
Event logged instead of START/END if the frame execution was skipped.
@ STM_EVENT_COLLECT_TSC
Collect Timestamp Counter.
@ SCHED_ROLLOVER_DONE
Rollover schedule switch done completion timestamp.
stmEventType_t logEventId
Type of event being logged.
@ SCHED_PARSING_TIME_DONE
STM master schedule parsing completion timestamp.
int(* stmLoggingEventCallback_t)(void *userdata, stmElementInfo_t *buf, size_t size)
Function signature for STM event log callbacks.
@ STM_EVENT_VPUF_OVERHEAD
Event to collect runtime overhead for VPUF STM command.
@ COMMAND_RESOURCE_MEMORY_OVERHEAD
STM master command memory overhead.
@ ARG_PARSING_TIME_START
STM master commandline parsing start timestamp.
@ SHM_COMM_SETUP_TIME_START
STM master shm/com setup start.
@ SCHED_CALLBACK_DONE
Rollover schedule switch callback done completion timestamp.
@ STM_EVENT_VPUSUB_OVERHEAD
Event to collect runtime overhead for VPUSUB STM command.
@ STM_EVENT_STATE_UPDATE
Change state.
@ SYNC_TIME_DONE
STM master sync server setup completion timestamp.
@ SHM_COMM_SETUP_TIME_STOP
STM master shm/com setup done.
stmClockInfo_t logClkSource
Clock source from which time has been obtained.
@ STM_EVENT_VULKANSUB_OVERHEAD
Event to collect runtime overhead for VULKANSUB STM command.
STM_API stmErrorCode_t stmRegisterStateCallBack(stmLoggingStateCallback_t func, void *userdata)
Registers a callback function with the Logger to be invoked during a state buffer write.
stmErrorCode_t
Return/error codes for all STM functions.
@ COMMAND_RESOURCE_TIME_START
STM master command setup start timestamp.
@ STM_EVENT_VULKANF_OVERHEAD
Event to collect runtime overhead for VULKANF STM command.
STM_API stmErrorCode_t stmLoggerFlush(void)
Flush all buffers to the callbacks.
@ COMMAND_RESOURCE_TIME_DONE
STM master command setup completion timestamp.
@ STM_EVENT_COLLECT_RTC
Collect Real Time Clock timestamp.
uint32_t optVal1
Optional value 1 (e.g.
A singular State Manager event.
STM_API stmErrorCode_t stmRegisterEventCallBack(stmLoggingEventCallback_t func, void *userdata)
Registers a callback function with the Logger to be invoked during a event buffer write.
@ LOGGER_SETUP_TIME_START
STM master logger setup start.
@ STM_EVENT_LDCF_OVERHEAD
Event to collect runtime overhead for LDCF STM command.
uint64_t logTime
Time when event occurred.
STM_API stmErrorCode_t stmLoggerExit(void)
Cleans up STM logger context.
@ STM_EVENT_THREAD_END
Event to collect active thread end time.
@ STM_EVENT_CUSUB_OVERHEAD
Event to collect runtime overhead for CUSUB STM command.
uint64_t logTime
Time when event occurred.
uint32_t hyperepochHash
Hash of hyperepoch corresponding to the event.
@ STM_EVENT_LDCSUB_OVERHEAD
Event to collect runtime overhead for LDCSUB STM command.
@ INIT_TIME_START
STM master init start timestamp.
@ stmClock_PTP_IOCTL_NVPPS
PTP hardware clock.
@ STM_EVENT_ERROR
Logged to indicate an error while logging [Deprecated].