Added macros for profiling functions and made it possible to compile the
profiling code out
This commit is contained in:
@@ -3,6 +3,22 @@
|
||||
|
||||
#include "aliases.h"
|
||||
|
||||
#ifndef MAX_PROFILE_SAMPLES
|
||||
#define MAX_PROFILE_SAMPLES 1024
|
||||
#endif // !MAX_PROFILE_SAMPLES
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
#define PROFILE_START profile_start()
|
||||
#define PROFILE_END profile_end()
|
||||
#define SAMPLE_START(ID, TITLE) profiler_sample_t ID = sample_start(TITLE)
|
||||
#define SAMPLE_END(ID) sample_end(&ID)
|
||||
#else
|
||||
#define PROFILE_START
|
||||
#define PROFILE_END
|
||||
#define SAMPLE_START(ID, TITLE)
|
||||
#define SAMPLE_END(ID)
|
||||
#endif // ENABLE_PROFILING
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user