Percepio Trace Recorder v4.8.0.hotfix1
|
Data Structures | |
struct | TraceEventBuffer |
Trace Event Buffer Structure. More... | |
Macros | |
#define | TRC_EVENT_BUFFER_OPTION_SKIP (0U) |
Buffer should skip new events when full. | |
#define | TRC_EVENT_BUFFER_OPTION_OVERWRITE (1U) |
Buffer should overwrite old events when full. | |
Typedefs | |
typedef struct TraceEventBuffer | TraceEventBuffer_t |
Trace Event Buffer Structure. | |
Functions | |
traceResult | xTraceEventBufferAlloc (TraceEventBuffer_t *pxTraceEventBuffer, uint32_t uiSize, void **ppvData) |
Allocates a data slot directly from the event buffer. | |
traceResult | xTraceEventBufferAllocCommit (TraceEventBuffer_t *pxTraceEventBuffer, const void *pvData, uint32_t uiSize, int32_t *piBytesWritten) |
Commits the last allocated block to the event buffer. | |
traceResult | xTraceEventBufferPush (TraceEventBuffer_t *pxTraceEventBuffer, void *pvData, uint32_t uiSize, int32_t *piBytesWritten) |
Pushes data into trace event buffer. | |
traceResult | xTraceEventBufferTransferAll (TraceEventBuffer_t *pxTraceEventBuffer, int32_t *piBytesWritten) |
Transfer trace event buffer data through streamport. | |
traceResult | xTraceEventBufferTransferChunk (TraceEventBuffer_t *pxTraceEventBuffer, uint32_t uiChunkSize, int32_t *piBytesWritten) |
Transfer trace event buffer data through streamport. | |
traceResult | xTraceEventBufferClear (TraceEventBuffer_t *pxTraceEventBuffer) |
Clears all data from event buffer. | |
traceResult xTraceEventBufferAlloc | ( | TraceEventBuffer_t * | pxTraceEventBuffer, |
uint32_t | uiSize, | ||
void ** | ppvData | ||
) |
Allocates a data slot directly from the event buffer.
[in] | pxTraceEventBuffer | Pointer to initialized trace event buffer. |
[in] | uiSize | Allocation size |
[out] | ppvData | Pointer that will hold the area from the buffer. |
TRC_FAIL | Failure |
TRC_SUCCESS | Success |
traceResult xTraceEventBufferAllocCommit | ( | TraceEventBuffer_t * | pxTraceEventBuffer, |
const void * | pvData, | ||
uint32_t | uiSize, | ||
int32_t * | piBytesWritten | ||
) |
Commits the last allocated block to the event buffer.
[in] | pxTraceEventBuffer | Pointer to initialized trace event buffer. |
TRC_FAIL | Failure |
TRC_SUCCESS | Success |
traceResult xTraceEventBufferClear | ( | TraceEventBuffer_t * | pxTraceEventBuffer | ) |
Clears all data from event buffer.
[in] | pxTraceEventBuffer | Pointer to initialized trace event buffer. |
TRC_FAIL | Failure |
TRC_SUCCESS | Success |
traceResult xTraceEventBufferPush | ( | TraceEventBuffer_t * | pxTraceEventBuffer, |
void * | pvData, | ||
uint32_t | uiSize, | ||
int32_t * | piBytesWritten | ||
) |
Pushes data into trace event buffer.
This routine attempts to push data into the trace event buffer.
[in] | pxTraceEventBuffer | Pointer to initialized trace event buffer. |
[in] | pvData | Pointer to data that should be pushed into trace event buffer. |
[in] | uiSize | Size of data. |
[out] | piBytesWritten | Bytes written. |
TRC_FAIL | Failure |
TRC_SUCCESS | Success |
traceResult xTraceEventBufferTransferAll | ( | TraceEventBuffer_t * | pxTraceEventBuffer, |
int32_t * | piBytesWritten | ||
) |
Transfer trace event buffer data through streamport.
This routine will attempt to transfer all existing data in the trace event buffer through the streamport. New data pushed to the trace event buffer during the execution of this routine will not be transferred
[in] | pxTraceEventBuffer | Pointer to initialized trace event buffer. |
[out] | piBytesWritten | Bytes written. |
TRC_FAIL | Failure |
TRC_SUCCESS | Success |
traceResult xTraceEventBufferTransferChunk | ( | TraceEventBuffer_t * | pxTraceEventBuffer, |
uint32_t | uiChunkSize, | ||
int32_t * | piBytesWritten | ||
) |
Transfer trace event buffer data through streamport.
This routine will attempt to transfer a chunk of existing data in the trace event buffer through the streamport. New data pushed to the trace event buffer during the execution of this routine will not be transfered.
When transferring a chunk which wraps the buffer, a singular transfer is made to avoid issuing dual writes. This configuration means that during wrapping, the chunk might be reduced in size even if there is more data at the start of the buffer. To transfer more data check piBytesWritten and issue multiple transfers if required.
[in] | pxTraceEventBuffer | Pointer to initialized trace event buffer. |
[out] | piBytesWritten | Bytes written. |
[in] | uiChunkSize | Maximum transfer chunk in bytes. |
TRC_FAIL | Failure |
TRC_SUCCESS | Success |