[Base] Add support for microprofile counters
This commit is contained in:
parent
6c67fe4b29
commit
f7026cb17b
|
@ -88,6 +88,15 @@ namespace xe {
|
||||||
MICROPROFILE_SCOPEGPUI(group_name, __FUNCTION__, \
|
MICROPROFILE_SCOPEGPUI(group_name, __FUNCTION__, \
|
||||||
xe::Profiler::GetColor(__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.
|
// Tracks a CPU value counter.
|
||||||
#define COUNT_profile_cpu(name, count) MICROPROFILE_META_CPU(name, count)
|
#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) \
|
#define SCOPE_profile_gpu_i(group_name, scope_name) \
|
||||||
do { \
|
do { \
|
||||||
} while (false)
|
} 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) \
|
#define COUNT_profile_cpu(name, count) \
|
||||||
do { \
|
do { \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
Loading…
Reference in New Issue