mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Add TracyNoop macro.
This commit is contained in:
parent
5e4eae5c2e
commit
c03884d20c
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#ifndef TRACY_ENABLE
|
#ifndef TRACY_ENABLE
|
||||||
|
|
||||||
|
#define TracyNoop
|
||||||
|
|
||||||
#define ZoneNamed(x,y)
|
#define ZoneNamed(x,y)
|
||||||
#define ZoneNamedN(x,y,z)
|
#define ZoneNamedN(x,y,z)
|
||||||
#define ZoneNamedC(x,y,z)
|
#define ZoneNamedC(x,y,z)
|
||||||
@ -123,6 +125,8 @@
|
|||||||
#include "../client/TracyProfiler.hpp"
|
#include "../client/TracyProfiler.hpp"
|
||||||
#include "../client/TracyScoped.hpp"
|
#include "../client/TracyScoped.hpp"
|
||||||
|
|
||||||
|
#define TracyNoop tracy::ProfilerAvailable()
|
||||||
|
|
||||||
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
||||||
# define ZoneNamed( varname, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,TracyLine) { nullptr, TracyFunction, TracyFile, (uint32_t)TracyLine, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,TracyLine), TRACY_CALLSTACK, active )
|
# define ZoneNamed( varname, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,TracyLine) { nullptr, TracyFunction, TracyFile, (uint32_t)TracyLine, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,TracyLine), TRACY_CALLSTACK, active )
|
||||||
# define ZoneNamedN( varname, name, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,TracyLine) { name, TracyFunction, TracyFile, (uint32_t)TracyLine, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,TracyLine), TRACY_CALLSTACK, active )
|
# define ZoneNamedN( varname, name, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,TracyLine) { name, TracyFunction, TracyFile, (uint32_t)TracyLine, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,TracyLine), TRACY_CALLSTACK, active )
|
||||||
|
Loading…
Reference in New Issue
Block a user