[Base] Add support for microprofile counters

This commit is contained in:
DrChat 2018-03-02 23:28:01 -06:00
parent 6c67fe4b29
commit f7026cb17b
1 changed files with 18 additions and 0 deletions

View File

@ -88,6 +88,15 @@ namespace xe {
MICROPROFILE_SCOPEGPUI(group_name, __FUNCTION__, \
xe::Profiler::GetColor(__FUNCTION__))
// Adds a number to a counter
#define COUNT_profile_add(name, count) MICROPROFILE_COUNTER_ADD(name, count)
// Subtracts a number to a counter
#define COUNT_profile_sub(name, count) MICROPROFILE_COUNTER_SUB(name, count)
// Sets a counter's value
#define COUNT_profile_set(name, count) MICROPROFILE_COUNTER_SET(name, count)
// Tracks a CPU value counter.
#define COUNT_profile_cpu(name, count) MICROPROFILE_META_CPU(name, count)
@ -118,6 +127,15 @@ namespace xe {
#define SCOPE_profile_gpu_i(group_name, scope_name) \
do { \
} while (false)
#define COUNT_profile_add(name, count) \
do { \
} while (false)
#define COUNT_profile_sub(name, count) \
do { \
} while (false)
#define COUNT_profile_set(name, count) \
do { \
} while (false)
#define COUNT_profile_cpu(name, count) \
do { \
} while (false)