src/ssx/trace/ssx_trace_core.c
// Creates an 8 byte entry in the trace buffer that includes a timestamp,
// a format string hash value and a 16 bit parameter.
//
// i_parm has the hash value combined with the 16 bit parameter
Creates an 8 byte entry in the trace buffer that includes a timestamp,
a format string hash value and a 16 bit parameter.

i_parm has the hash value combined with the 16 bit parameter
Creates an 8 byte entry in the trace buffer that includes a timestamp a format string hash value and a 16 bit parameter . i_parm has the hash value combined with the 16 bit parameter
void ssx_trace_tiny(uint32_t i_parm)
{
    SsxTraceTiny        footer;
    SsxTraceState       state;
    uint64_t*           ptr64;
    uint64_t            tb64;
    SsxMachineContext   ctx;
    footer.parms.word32 = i_parm;
    tb64 = ssx_ext_timebase_get();
    state.tbu32 = tb64 >> 32;
    footer.time_format.word32 = tb64 & 0x00000000ffffffffull;
    footer.time_format.format = SSX_TRACE_FORMAT_TINY;
    ssx_critical_section_enter(SSX_NONCRITICAL, &ctx);
    ptr64 = (uint64_t*)&g_ssx_trace_buf.cb[g_ssx_trace_buf.state.offset & SSX_TRACE_CB_MASK];
    state.offset = g_ssx_trace_buf.state.offset + sizeof(SsxTraceTiny);
    g_ssx_trace_buf.state.word64 = state.word64;
    *ptr64 = footer.word64;
    ssx_critical_section_exit(&ctx);
}
void ssx_trace_tiny ( uint32_t i_parm ) { SsxTraceTiny footer ; SsxTraceState state ; uint64_t * ptr64 ; uint64_t tb64 ; SsxMachineContext ctx ; footer . parms . word32 = i_parm ; tb64 = ssx_ext_timebase_get ( ) ; state . tbu32 = tb64 >> 32 ; footer . time_format . word32 = tb64 & 0x00000000ffffffffull ; footer . time_format . format = SSX_TRACE_FORMAT_TINY ; ssx_critical_section_enter ( SSX_NONCRITICAL , & ctx ) ; ptr64 = ( uint64_t * ) & g_ssx_trace_buf . cb [ g_ssx_trace_buf . state . offset & SSX_TRACE_CB_MASK ] ; state . offset = g_ssx_trace_buf . state . offset + sizeof ( SsxTraceTiny ) ; g_ssx_trace_buf . state . word64 = state . word64 ; * ptr64 = footer . word64 ; ssx_critical_section_exit ( & ctx ) ; }
Creates an 8 byte entry in the trace buffer that includes a timestamp,
a format string hash value and a 16 bit parameter.
Creates an 8 byte entry in the trace buffer that includes a timestamp a format string hash value and a 16 bit parameter .
//fill in the footer data //The following operations must be done atomically //load the current byte count and calculate the address for this //entry in the cb //calculate the offset for the next entry in the cb //update the cb state (tbu and offset) //write the data to the circular buffer including the //timesamp, string hash, and 16bit parameter //exit the critical section