GLdc/GL/profiler.h
Hayden K edbff32340 - changes to allocation and mem mgmt
- Replace some mem* functions with store queues
- fix capacity of AlignedVector to 32 intervals
- turn profiler fully compile only
2019-03-12 23:47:54 -04:00

31 lines
668 B
C

#pragma once
#include <stdint.h>
#define PROFILER_COMPILE 0
#if PROFILER_COMPILE
#define PROFILER_PUSH(S) profiler_push(S)
#define PROFILER_CHECKPOINT(P) profiler_checkpoint(P)
#define PROFILER_POP() profiler_pop()
#define PROFILER_PRINT_STATS() profiler_print_stats()
void profiler_enable();
void profiler_disable();
typedef struct {
char name[64];
uint64_t start_time_in_us;
} Profiler;
Profiler* profiler_push(const char* name);
void profiler_checkpoint(const char* name);
void profiler_pop();
void profiler_print_stats();
#else
#define PROFILER_PUSH(S)
#define PROFILER_CHECKPOINT(P)
#define PROFILER_POP()
#define PROFILER_PRINT_STATS()
#endif