Percepio Trace Recorder v4.11.0
Loading...
Searching...
No Matches
trcRecorder.h File Reference

The public API of the Percepio trace recorder. More...

#include <trcDefines.h>
#include <trcConfig.h>
#include <trcKernelPortConfig.h>
#include <trcTypes.h>
#include <trcHardwarePort.h>
#include <trcKernelPort.h>
#include <trcString.h>
#include <trcStaticBuffer.h>
#include <trcError.h>
#include <trcEvent.h>
#include <trcEventBuffer.h>
#include <trcMultiCoreEventBuffer.h>
#include <trcTimestamp.h>
#include <trcEntryTable.h>
#include <trcStreamPort.h>
#include <trcISR.h>
#include <trcTask.h>
#include <trcObject.h>
#include <trcPrint.h>
#include <trcHeap.h>
#include <trcExtension.h>
#include <trcUtility.h>
#include <trcStackMonitor.h>
#include <trcInternalEventBuffer.h>
#include <trcDiagnostics.h>
#include <trcAssert.h>
#include <trcRunnable.h>
#include <trcDependency.h>
#include <trcProcess.h>
#include <trcThread.h>
#include <trcInterval.h>
#include <trcStateMachine.h>
#include <trcCounter.h>
#include <trcTaskMonitor.h>

Go to the source code of this file.

Macros

#define xTraceIsRecorderEnabled()
 Query if recorder is enabled.
#define xTraceIsRecorderInitialized()
 Query if recorder initialized.
#define xTraceSetComponentInitialized(uiComponentBit)
 Flag component as initialized.
#define xTraceIsComponentInitialized(uiComponentBit)
 Query if component is initialized.
#define xTraceStateSet(uxState)
 Set the trace state.
#define xTraceStateGet(puxState)
 Query the trace state.
#define vTraceInitialize   (void)xTraceInitialize
#define vTraceEnable   (void)xTraceEnable
#define vTraceStop   (void)xTraceDisable
#define vTraceInstanceFinishedNow   (void)xTraceTaskInstanceFinishedNow
#define vTraceInstanceFinishedNext   (void)xTraceTaskInstanceFinishedNext
#define vTracePrintF   (void)xTracePrintF
#define vTraceVPrintF   (void)xTraceVPrintF
#define vTracePrint   (void)xTracePrint
#define vTraceSetRecorderDataBuffer(pxBuffer)

Functions

traceResult xTraceInitialize (void)
 Initializes the recorder data. xTraceInitialize() or xTraceEnable(...) must be called before any attempts at adding trace data/information. xTraceInitialize() can be called before timestamp source is initialized since timestamps aren't used until xTraceEnable(...) is called.
traceResult xTraceDisable (void)
 Disables tracing.
traceResult xTraceHeaderInitialize (TraceHeaderBuffer_t *pxBuffer)
 Initializes the header data.
traceResult xTraceTzCtrl (void)
 Call this function periodically.
traceResult xTraceGetEventBuffer (void **ppvBuffer, TraceUnsignedBaseType_t *puiSize)
 Retrieve the event buffer and event buffer size.

Detailed Description

The public API of the Percepio trace recorder.

Macro Definition Documentation

◆ vTraceEnable

#define vTraceEnable   (void)xTraceEnable
Deprecated
Backwards compatibility. Use xTraceEnable instead.

◆ vTraceInitialize

#define vTraceInitialize   (void)xTraceInitialize
Deprecated
Backwards compatibility. Use xTraceInitialize instead.

◆ vTraceInstanceFinishedNext

#define vTraceInstanceFinishedNext   (void)xTraceTaskInstanceFinishedNext
Deprecated
Backwards compatibility. Use xTraceTaskInstanceFinishedNext instead.

◆ vTraceInstanceFinishedNow

#define vTraceInstanceFinishedNow   (void)xTraceTaskInstanceFinishedNow
Deprecated
Backwards compatibility. Use xTraceTaskInstanceFinishedNow instead.

◆ vTracePrint

#define vTracePrint   (void)xTracePrint
Deprecated
Backwards compatibility. Use xTracePrint instead.

◆ vTracePrintF

#define vTracePrintF   (void)xTracePrintF
Deprecated
Backwards compatibility. Use xTracePrintF instead.

◆ vTraceSetRecorderDataBuffer

#define vTraceSetRecorderDataBuffer ( pxBuffer)
Value:
xTraceSetBuffer((TraceRecorderData_t*)(pxBuffer))
Deprecated
Backwards compatibility. Use xTraceSetBuffer instead.

◆ vTraceStop

#define vTraceStop   (void)xTraceDisable
Deprecated
Backwards compatibility. Use xTraceDisable instead.

◆ vTraceVPrintF

#define vTraceVPrintF   (void)xTraceVPrintF
Deprecated
Backwards compatibility. Use xTraceVPrintF instead.

◆ xTraceIsComponentInitialized

#define xTraceIsComponentInitialized ( uiComponentBit)
Value:
(RecorderInitialized & (uiComponentBit))

Query if component is initialized.

Parameters
[in]uiComponentBitComponent bit
Return values
Non-zeroComponent initialized
0Component not initialized

◆ xTraceIsRecorderEnabled

#define xTraceIsRecorderEnabled ( )
Value:
(xTraceIsRecorderInitialized() && pxTraceRecorderData->uiRecorderEnabled)
#define xTraceIsRecorderInitialized()
Query if recorder initialized.
Definition trcRecorder.h:273

Query if recorder is enabled.

Return values
Non-zeroRecorder enabled
0Recorder not enabled

◆ xTraceIsRecorderInitialized

#define xTraceIsRecorderInitialized ( )
Value:
xTraceIsComponentInitialized(TRC_RECORDER_COMPONENT_CORE)
#define xTraceIsComponentInitialized(uiComponentBit)
Query if component is initialized.
Definition trcRecorder.h:293

Query if recorder initialized.

Return values
Non-zeroRecorder initialized
0Recorder not initialized

◆ xTraceSetComponentInitialized

#define xTraceSetComponentInitialized ( uiComponentBit)
Value:
TRC_COMMA_EXPR_TO_STATEMENT_EXPR_2(RecorderInitialized |= (uiComponentBit), TRC_SUCCESS)

Flag component as initialized.

Parameters
[in]uiComponentBitComponent bit
Return values
TRC_FAILFailure
TRC_SUCCESSSuccess

◆ xTraceStateGet

#define xTraceStateGet ( puxState)
Value:
TRC_COMMA_EXPR_TO_STATEMENT_EXPR_2(*(puxState) = pxTraceRecorderData->uxTraceSystemStates[TRC_CFG_GET_CURRENT_CORE()], TRC_SUCCESS)

Query the trace state.

Parameters
[out]puiStateState
Return values
TRC_FAILFailure
TRC_SUCCESSSuccess

◆ xTraceStateSet

#define xTraceStateSet ( uxState)
Value:
TRC_COMMA_EXPR_TO_STATEMENT_EXPR_2(pxTraceRecorderData->uxTraceSystemStates[TRC_CFG_GET_CURRENT_CORE()] = (uxState), TRC_SUCCESS)

Set the trace state.

Parameters
[in]uiStateState
Return values
TRC_FAILFailure
TRC_SUCCESSSuccess

Function Documentation

◆ xTraceDisable()

traceResult xTraceDisable ( void )

Disables tracing.

Return values
TRC_FAILFailure
TRC_SUCCESSSuccess

◆ xTraceGetEventBuffer()

traceResult xTraceGetEventBuffer ( void ** ppvBuffer,
TraceUnsignedBaseType_t * puiSize )

Retrieve the event buffer and event buffer size.

Parameters
[out]ppvBufferPointer where event buffer pointer will be written
[out]puiSizeEvent buffer size
Return values
TRC_FAILFailure
TRC_SUCCESSSuccess

◆ xTraceHeaderInitialize()

traceResult xTraceHeaderInitialize ( TraceHeaderBuffer_t * pxBuffer)

Initializes the header data.

Parameters
[in]pxBufferPointer to header buffer
Return values
TRC_FAILFailure
TRC_SUCCESSSuccess

◆ xTraceInitialize()

traceResult xTraceInitialize ( void )

Initializes the recorder data. xTraceInitialize() or xTraceEnable(...) must be called before any attempts at adding trace data/information. xTraceInitialize() can be called before timestamp source is initialized since timestamps aren't used until xTraceEnable(...) is called.

See xTraceEnable(...) for more information.

Return values
TRC_FAILFailure
TRC_SUCCESSSuccess

◆ xTraceTzCtrl()

traceResult xTraceTzCtrl ( void )

Call this function periodically.

Return values
TRC_FAILFailure
TRC_SUCCESSSuccess