shengine pre-release
shengine by mrsinho
Loading...
Searching...
No Matches
shProfiling.h File Reference

Profiling functionality for the shengine module. More...

#include "shengine/shEngineVkCore.h"
#include <smd/smd.h>

Go to the source code of this file.

Data Structures

struct  ShProfilingTimer
 Structure to hold profiling timer information in ShEngine. More...
 

Macros

#define SH_PROFILING_TIMER_MAX_EXT_COUNT   1024
 Maximum number of extension timers supported.
 

Typedefs

typedef enum ShProfilingTimerType ShProfilingTimerType
 
typedef struct ShProfilingTimer ShProfilingTimer
 

Enumerations

enum  ShProfilingTimerType {
  SH_PROFILING_TIMER_MAIN_THREAD = 0 , SH_PROFILING_TIMER_APPLICATION_UPDATE = 1 , SH_PROFILING_TIMER_APPLICATION_MAIN_CMD_BUFFER = 2 , SH_PROFILING_TIMER_APPLICATION_MAIN_RENDERPASS ,
  SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_0 , SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_1 , SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_2 , SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_3 ,
  SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_4 , SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_5 , SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_6 , SH_PROFILING_TIMER_EXT ,
  SH_PROFILING_TIMER_MAX_ENUM
}
 Types of profiling timers used by the shengine library. More...
 

Functions

uint8_t shProfilingTimerStart (ShProfilingTimer *p_timer, ShProfilingTimerType type)
 Starts the specified profiling timer.
 
uint8_t shProfilingTimerEnd (ShProfilingTimer *p_timer, ShProfilingTimerType type)
 Ends the specified profiling timer.
 
uint8_t shProfilingTimerSetExtCount (ShProfilingTimer *p_timer, uint32_t ext_count)
 Sets the count of extension timers in the ShProfilingTimer structure.
 
uint8_t shProfilingTimerStartExt (ShProfilingTimer *p_timer, SmdVarName name, uint32_t timer_idx)
 Starts an extension profiling timer with the specified name and index.
 
uint8_t shProfilingTimerEndExt (ShProfilingTimer *p_timer, uint32_t timer_idx)
 Ends an extension profiling timer with the specified index.
 

Detailed Description

Profiling functionality for the shengine module.

The shProfiling.h file contains structures and functions related to profiling and timing within the shengine framework.

Macro Definition Documentation

◆ SH_PROFILING_TIMER_MAX_EXT_COUNT

#define SH_PROFILING_TIMER_MAX_EXT_COUNT   1024

Maximum number of extension timers supported.

Typedef Documentation

◆ ShProfilingTimer

◆ ShProfilingTimerType

Enumeration Type Documentation

◆ ShProfilingTimerType

Types of profiling timers used by the shengine library.

The ShProfilingTimerType enumeration defines various types of profiling timers used by the shengine library. Each type corresponds to a specific aspect of the engine's execution.

Enumerator
SH_PROFILING_TIMER_MAIN_THREAD 

Main thread timer.

SH_PROFILING_TIMER_APPLICATION_UPDATE 

Application update timer.

SH_PROFILING_TIMER_APPLICATION_MAIN_CMD_BUFFER 

Application main command buffer timer.

SH_PROFILING_TIMER_APPLICATION_MAIN_RENDERPASS 

Application main render pass timer.

SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_0 

Main command buffer wait timer 0.

SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_1 

Main command buffer wait timer 1.

SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_2 

Main command buffer wait timer 2.

SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_3 

Main command buffer wait timer 3.

SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_4 

Main command buffer wait timer 4.

SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_5 

Main command buffer wait timer 5.

SH_PROFILING_TIMER_MAIN_CMD_BUFFER_WAIT_6 

Main command buffer wait timer 6.

SH_PROFILING_TIMER_EXT 

extension timer type.

SH_PROFILING_TIMER_MAX_ENUM 

Maximum value for enumeration.

Function Documentation

◆ shProfilingTimerEnd()

uint8_t shProfilingTimerEnd ( ShProfilingTimer p_timer,
ShProfilingTimerType  type 
)
extern

Ends the specified profiling timer.

Parameters
p_timerPointer to a valid ShProfilingTimer structure.
typeType of the profiling timer to end.
Returns
1 on success, 0 on failure.

◆ shProfilingTimerEndExt()

uint8_t shProfilingTimerEndExt ( ShProfilingTimer p_timer,
uint32_t  timer_idx 
)
extern

Ends an extension profiling timer with the specified index.

Parameters
p_timerPointer to a valid ShProfilingTimer structure.
timer_idxIndex of the extension timer.
Returns
1 on success, 0 on failure.

◆ shProfilingTimerSetExtCount()

uint8_t shProfilingTimerSetExtCount ( ShProfilingTimer p_timer,
uint32_t  ext_count 
)
extern

Sets the count of extension timers in the ShProfilingTimer structure.

Parameters
p_timerPointer to a valid ShProfilingTimer structure.
ext_countCount of extension timers.
Returns
1 on success, 0 on failure.

◆ shProfilingTimerStart()

uint8_t shProfilingTimerStart ( ShProfilingTimer p_timer,
ShProfilingTimerType  type 
)
extern

Starts the specified profiling timer.

Parameters
p_timerPointer to a valid ShProfilingTimer structure.
typeType of the profiling timer to start.
Returns
1 on success, 0 on failure.

◆ shProfilingTimerStartExt()

uint8_t shProfilingTimerStartExt ( ShProfilingTimer p_timer,
SmdVarName  name,
uint32_t  timer_idx 
)
extern

Starts an extension profiling timer with the specified name and index.

Parameters
p_timerPointer to a valid ShProfilingTimer structure.
nameName of the extension timer.
timer_idxIndex of the extension timer.
Returns
1 on success, 0 on failure.