iLLD_TC27xD  1.0
Performance Counter Functions
Collaboration diagram for Performance Counter Functions:

Functions

IFX_INLINE uint32 IfxCpu_getClockCounter (void)
 API to read the clock counter for the CPU which calls this API. More...
 
IFX_INLINE boolean IfxCpu_getClockCounterStickyOverflow (void)
 API to get sticky overflow bit of clock counter for the CPU, which calls this API. More...
 
IFX_INLINE uint32 IfxCpu_getInstructionCounter (void)
 API to read the instruction counter for the CPU which calls this API. More...
 
IFX_INLINE boolean IfxCpu_getInstructionCounterStickyOverflow (void)
 API to get sticky overflow bit of Instruction counter for the CPU, which calls this API. More...
 
IFX_INLINE uint32 IfxCpu_getPerformanceCounter (uint32 address)
 API to read the performance counter for the CPU which calls this API. More...
 
IFX_INLINE boolean IfxCpu_getPerformanceCounterStickyOverflow (uint32 address)
 API to get sticky overflow bit of performance counter for the CPU, which calls this API. This is generic function to get sticky overflow bit of any performance counters. More...
 
IFX_INLINE void IfxCpu_resetAndStartCounters (IfxCpu_CounterMode mode)
 Reset and start instruction, clock and multi counters. More...
 
IFX_INLINE void IfxCpu_setPerformanceCountersEnableBit (uint32 enable)
 API to enable or disable performance counter for the CPU which calls this API. More...
 
IFX_INLINE IfxCpu_Perf IfxCpu_stopCounters (void)
 Stop instruction and clock counters, return their values. More...
 
IFX_INLINE void IfxCpu_updateClockCounter (uint32 count)
 API to update clock counter for the CPU which calls this API. More...
 
IFX_INLINE void IfxCpu_updateInstructionCounter (uint32 count)
 API to update Instruction counter for the CPU which calls this API. More...
 
IFX_INLINE void IfxCpu_updatePerformanceCounter (uint32 address, uint32 count)
 API to update performance counter for the CPU which calls this API. This is generic function to update any of the performance counters. More...
 

Detailed Description

Function Documentation

IFX_INLINE uint32 IfxCpu_getClockCounter ( void  )

API to read the clock counter for the CPU which calls this API.

This API can be used to read clock counter of only the caller CPU. It cannot be used for this activity towards other CPUs.

Returns
Counter value. 0 to 0x7FFFFFFF.

Definition at line 662 of file IfxCpu.h.

IFX_INLINE boolean IfxCpu_getClockCounterStickyOverflow ( void  )

API to get sticky overflow bit of clock counter for the CPU, which calls this API.

This API can be used to get sticky overflow bit of clock counter of only the caller CPU. It cannot be used for this activity towards other CPUs. This API also clears the sticky overflow after the read. While reading the sticky bit this API disables the counter for short time. (otherwise sticky bit cannot be cleared). This API shall be used after reading the counter

Returns
Status of sticky overflow bit.
Return values
TRUE,:Sticky overflow bit is set.
FALSE,:Sticky overflow bit is reset

Definition at line 668 of file IfxCpu.h.

IFX_INLINE uint32 IfxCpu_getInstructionCounter ( void  )

API to read the instruction counter for the CPU which calls this API.

This API can be used to read instruction counter of only the caller CPU. It cannot be used for this activity towards other CPUs

Returns
Counter value. 0 to 0x7FFFFFFF.

Definition at line 690 of file IfxCpu.h.

IFX_INLINE boolean IfxCpu_getInstructionCounterStickyOverflow ( void  )

API to get sticky overflow bit of Instruction counter for the CPU, which calls this API.

This API can be used to get sticky overflow bit of Instruction counter of only the caller CPU. It cannot be used for this activity towards other CPUs. This API also clears the sticky overflow after the read. While reading the sticky bit this API disables the counter for short time. (otherwise sticky bit cannot be cleared). This API shall be used after reading the counter

Returns
Status of sticky overflow bit.
Return values
TRUE,:Sticky overflow bit is set.
FALSE,:Sticky overflow bit is reset

Definition at line 696 of file IfxCpu.h.

IFX_INLINE uint32 IfxCpu_getPerformanceCounter ( uint32  address)

API to read the performance counter for the CPU which calls this API.

Parameters
addressAddress
Returns
counter value

Definition at line 702 of file IfxCpu.h.

Referenced by IfxCpu_getClockCounter(), and IfxCpu_getInstructionCounter().

IFX_INLINE boolean IfxCpu_getPerformanceCounterStickyOverflow ( uint32  address)

API to get sticky overflow bit of performance counter for the CPU, which calls this API. This is generic function to get sticky overflow bit of any performance counters.

Parameters
addressAddress
Returns
Status

Definition at line 710 of file IfxCpu.h.

Referenced by IfxCpu_getClockCounterStickyOverflow(), and IfxCpu_getInstructionCounterStickyOverflow().

IFX_INLINE void IfxCpu_resetAndStartCounters ( IfxCpu_CounterMode  mode)

Reset and start instruction, clock and multi counters.

Reset and start CCNT, ICNT, M1CNT, M2CNT, M3CNT. the overflow bits are cleared.

Parameters
modeCounter mode
Returns
None

Definition at line 770 of file IfxCpu.h.

IFX_INLINE void IfxCpu_setPerformanceCountersEnableBit ( uint32  enable)

API to enable or disable performance counter for the CPU which calls this API.

This API can be used to enable or disable performance counter of only the caller CPU. It cannot be used for this activity towards other CPUs.

Parameters
enableenable Command to enable or disable the performance counter. TRUE: Enable the performance counter. FALSE: Disable the performance counter
Returns
None

Definition at line 819 of file IfxCpu.h.

IFX_INLINE IfxCpu_Perf IfxCpu_stopCounters ( void  )

Stop instruction and clock counters, return their values.

Stop CCNT, ICNT, M1CNT, M2CNT, M3CNT and return their values; The CCTRL is reset to 0, for more accurate measurements and has to be initialized again before strating the next performance measurement.

Returns
Performance counter result

Definition at line 864 of file IfxCpu.h.

IFX_INLINE void IfxCpu_updateClockCounter ( uint32  count)

API to update clock counter for the CPU which calls this API.

This API can be used to update clock counter of only the caller CPU. It cannot be used for this activity towards other CPUs.

Parameters
countCounter value to be updated. 0 to 0x7FFFFFFF
Returns
None

Definition at line 909 of file IfxCpu.h.

IFX_INLINE void IfxCpu_updateInstructionCounter ( uint32  count)

API to update Instruction counter for the CPU which calls this API.

This API can be used to update Instruction counter of only the caller CPU. It cannot be used for this activity towards other CPUs.

Parameters
countCounter value to be updated. 0 to 0x7FFFFFFF
Returns
None

Definition at line 915 of file IfxCpu.h.

IFX_INLINE void IfxCpu_updatePerformanceCounter ( uint32  address,
uint32  count 
)

API to update performance counter for the CPU which calls this API. This is generic function to update any of the performance counters.

Parameters
addressAddress
countCount
Returns
None

Definition at line 921 of file IfxCpu.h.

Referenced by IfxCpu_updateClockCounter(), and IfxCpu_updateInstructionCounter().