2017-09-10 18:10:20 +00:00
|
|
|
#ifndef __TRACY_HPP__
|
|
|
|
#define __TRACY_HPP__
|
|
|
|
|
2017-11-25 14:18:23 +00:00
|
|
|
#include "common/TracyColor.hpp"
|
2017-10-22 15:05:35 +00:00
|
|
|
#include "common/TracySystem.hpp"
|
|
|
|
|
2017-10-16 19:34:39 +00:00
|
|
|
#ifndef TRACY_ENABLE
|
2017-09-18 17:08:54 +00:00
|
|
|
|
2018-08-13 12:47:52 +00:00
|
|
|
#define ZoneNamed(x,y)
|
|
|
|
#define ZoneNamedN(x,y,z)
|
|
|
|
#define ZoneNamedC(x,y,z)
|
|
|
|
#define ZoneNamedNC(x,y,z,w)
|
2018-07-26 17:42:45 +00:00
|
|
|
|
2020-08-16 13:05:45 +00:00
|
|
|
#define ZoneTransient(x,y)
|
|
|
|
#define ZoneTransientN(x,y,z)
|
|
|
|
|
2017-09-18 17:08:54 +00:00
|
|
|
#define ZoneScoped
|
2017-11-14 22:06:45 +00:00
|
|
|
#define ZoneScopedN(x)
|
2017-09-25 20:46:14 +00:00
|
|
|
#define ZoneScopedC(x)
|
2017-11-14 22:06:45 +00:00
|
|
|
#define ZoneScopedNC(x,y)
|
2017-09-25 20:46:14 +00:00
|
|
|
|
2017-09-28 17:20:19 +00:00
|
|
|
#define ZoneText(x,y)
|
2020-05-28 03:24:13 +00:00
|
|
|
#define ZoneTextV(x,y,z)
|
2018-06-29 14:01:31 +00:00
|
|
|
#define ZoneName(x,y)
|
2020-05-28 03:24:13 +00:00
|
|
|
#define ZoneNameV(x,y,z)
|
2020-11-27 11:37:35 +00:00
|
|
|
#define ZoneColor(x)
|
|
|
|
#define ZoneColorV(x,y)
|
2020-05-24 14:13:09 +00:00
|
|
|
#define ZoneValue(x)
|
2020-05-28 03:24:13 +00:00
|
|
|
#define ZoneValueV(x,y)
|
2021-02-16 19:38:54 +00:00
|
|
|
#define ZoneIsActive false
|
|
|
|
#define ZoneIsActiveV(x) false
|
2017-09-28 17:20:19 +00:00
|
|
|
|
2017-09-18 17:08:54 +00:00
|
|
|
#define FrameMark
|
2018-08-04 13:04:18 +00:00
|
|
|
#define FrameMarkNamed(x)
|
2018-08-05 00:09:59 +00:00
|
|
|
#define FrameMarkStart(x)
|
|
|
|
#define FrameMarkEnd(x)
|
2017-09-18 17:08:54 +00:00
|
|
|
|
2019-06-12 13:28:32 +00:00
|
|
|
#define FrameImage(x,y,z,w,a)
|
2019-06-06 19:39:54 +00:00
|
|
|
|
2017-10-04 13:41:02 +00:00
|
|
|
#define TracyLockable( type, varname ) type varname;
|
2017-10-12 18:00:53 +00:00
|
|
|
#define TracyLockableN( type, varname, desc ) type varname;
|
2017-12-10 20:49:45 +00:00
|
|
|
#define TracySharedLockable( type, varname ) type varname;
|
|
|
|
#define TracySharedLockableN( type, varname, desc ) type varname;
|
2017-10-04 13:41:02 +00:00
|
|
|
#define LockableBase( type ) type
|
2017-12-10 20:49:45 +00:00
|
|
|
#define SharedLockableBase( type ) type
|
2017-12-05 15:36:33 +00:00
|
|
|
#define LockMark(x) (void)x;
|
2020-03-08 12:47:38 +00:00
|
|
|
#define LockableName(x,y,z);
|
2017-10-04 13:41:02 +00:00
|
|
|
|
2017-10-13 00:07:03 +00:00
|
|
|
#define TracyPlot(x,y)
|
2019-11-05 15:47:41 +00:00
|
|
|
#define TracyPlotConfig(x,y)
|
2017-10-13 00:07:03 +00:00
|
|
|
|
2017-10-15 11:06:20 +00:00
|
|
|
#define TracyMessage(x,y)
|
2017-10-15 11:06:49 +00:00
|
|
|
#define TracyMessageL(x)
|
2019-05-10 18:17:44 +00:00
|
|
|
#define TracyMessageC(x,y,z)
|
|
|
|
#define TracyMessageLC(x,y)
|
2019-07-12 16:14:42 +00:00
|
|
|
#define TracyAppInfo(x,y)
|
2017-10-14 11:23:13 +00:00
|
|
|
|
2018-04-04 17:44:44 +00:00
|
|
|
#define TracyAlloc(x,y)
|
|
|
|
#define TracyFree(x)
|
2020-06-23 23:33:26 +00:00
|
|
|
#define TracySecureAlloc(x,y)
|
|
|
|
#define TracySecureFree(x)
|
2018-07-26 17:34:59 +00:00
|
|
|
|
2020-09-22 16:22:34 +00:00
|
|
|
#define TracyAllocN(x,y,z)
|
|
|
|
#define TracyFreeN(x,y)
|
|
|
|
#define TracySecureAllocN(x,y,z)
|
|
|
|
#define TracySecureFreeN(x,y)
|
|
|
|
|
2018-08-13 16:32:27 +00:00
|
|
|
#define ZoneNamedS(x,y,z)
|
|
|
|
#define ZoneNamedNS(x,y,z,w)
|
|
|
|
#define ZoneNamedCS(x,y,z,w)
|
|
|
|
#define ZoneNamedNCS(x,y,z,w,a)
|
2018-07-26 17:42:45 +00:00
|
|
|
|
2020-08-16 13:05:45 +00:00
|
|
|
#define ZoneTransientS(x,y,z)
|
|
|
|
#define ZoneTransientNS(x,y,z,w)
|
|
|
|
|
2018-07-26 17:34:59 +00:00
|
|
|
#define ZoneScopedS(x)
|
|
|
|
#define ZoneScopedNS(x,y)
|
|
|
|
#define ZoneScopedCS(x,y)
|
|
|
|
#define ZoneScopedNCS(x,y,z)
|
|
|
|
|
2018-06-19 17:36:28 +00:00
|
|
|
#define TracyAllocS(x,y,z)
|
|
|
|
#define TracyFreeS(x,y)
|
2020-06-23 23:33:26 +00:00
|
|
|
#define TracySecureAllocS(x,y,z)
|
|
|
|
#define TracySecureFreeS(x,y)
|
2018-04-04 17:44:44 +00:00
|
|
|
|
2020-09-22 16:22:34 +00:00
|
|
|
#define TracyAllocNS(x,y,z,w)
|
|
|
|
#define TracyFreeNS(x,y,z)
|
|
|
|
#define TracySecureAllocNS(x,y,z,w)
|
|
|
|
#define TracySecureFreeNS(x,y,z)
|
|
|
|
|
2019-11-14 22:50:52 +00:00
|
|
|
#define TracyMessageS(x,y,z)
|
|
|
|
#define TracyMessageLS(x,y)
|
|
|
|
#define TracyMessageCS(x,y,z,w)
|
|
|
|
#define TracyMessageLCS(x,y,z)
|
|
|
|
|
2019-11-25 22:59:48 +00:00
|
|
|
#define TracyParameterRegister(x)
|
|
|
|
#define TracyParameterSetup(x,y,z,w)
|
2020-07-16 09:24:44 +00:00
|
|
|
#define TracyIsConnected false
|
2019-11-25 22:59:48 +00:00
|
|
|
|
2021-11-01 22:56:19 +00:00
|
|
|
#define TracyFiberEnter(x)
|
|
|
|
#define TracyFiberLeave
|
|
|
|
|
2017-09-18 17:08:54 +00:00
|
|
|
#else
|
|
|
|
|
2020-08-16 13:05:45 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2017-10-16 19:28:38 +00:00
|
|
|
#include "client/TracyLock.hpp"
|
|
|
|
#include "client/TracyProfiler.hpp"
|
|
|
|
#include "client/TracyScoped.hpp"
|
2017-09-10 18:10:20 +00:00
|
|
|
|
2018-12-13 13:43:37 +00:00
|
|
|
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
2022-07-01 15:22:48 +00:00
|
|
|
# define ZoneNamed( varname, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), TRACY_CALLSTACK, active )
|
|
|
|
# define ZoneNamedN( varname, name, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), TRACY_CALLSTACK, active )
|
|
|
|
# define ZoneNamedC( varname, color, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), TRACY_CALLSTACK, active )
|
|
|
|
# define ZoneNamedNC( varname, name, color, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), TRACY_CALLSTACK, active )
|
2020-08-16 13:05:45 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
# define ZoneTransient( varname, active ) tracy::ScopedZone varname( __LINE__, __FILE__, strlen( __FILE__ ), __FUNCTION__, strlen( __FUNCTION__ ), nullptr, 0, TRACY_CALLSTACK, active )
|
|
|
|
# define ZoneTransientN( varname, name, active ) tracy::ScopedZone varname( __LINE__, __FILE__, strlen( __FILE__ ), __FUNCTION__, strlen( __FUNCTION__ ), name, strlen( name ), TRACY_CALLSTACK, active )
|
2018-12-13 13:43:37 +00:00
|
|
|
#else
|
2022-07-01 15:22:48 +00:00
|
|
|
# define ZoneNamed( varname, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), active )
|
|
|
|
# define ZoneNamedN( varname, name, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), active )
|
|
|
|
# define ZoneNamedC( varname, color, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), active )
|
|
|
|
# define ZoneNamedNC( varname, name, color, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), active )
|
2020-08-16 13:05:45 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
# define ZoneTransient( varname, active ) tracy::ScopedZone varname( __LINE__, __FILE__, strlen( __FILE__ ), __FUNCTION__, strlen( __FUNCTION__ ), nullptr, 0, active )
|
|
|
|
# define ZoneTransientN( varname, name, active ) tracy::ScopedZone varname( __LINE__, __FILE__, strlen( __FILE__ ), __FUNCTION__, strlen( __FUNCTION__ ), name, strlen( name ), active )
|
2018-12-13 13:43:37 +00:00
|
|
|
#endif
|
2018-07-26 17:42:45 +00:00
|
|
|
|
2018-08-13 12:47:52 +00:00
|
|
|
#define ZoneScoped ZoneNamed( ___tracy_scoped_zone, true )
|
|
|
|
#define ZoneScopedN( name ) ZoneNamedN( ___tracy_scoped_zone, name, true )
|
|
|
|
#define ZoneScopedC( color ) ZoneNamedC( ___tracy_scoped_zone, color, true )
|
|
|
|
#define ZoneScopedNC( name, color ) ZoneNamedNC( ___tracy_scoped_zone, name, color, true )
|
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
#define ZoneText( txt, size ) ___tracy_scoped_zone.Text( txt, size )
|
|
|
|
#define ZoneTextV( varname, txt, size ) varname.Text( txt, size )
|
|
|
|
#define ZoneName( txt, size ) ___tracy_scoped_zone.Name( txt, size )
|
|
|
|
#define ZoneNameV( varname, txt, size ) varname.Name( txt, size )
|
|
|
|
#define ZoneColor( color ) ___tracy_scoped_zone.Color( color )
|
|
|
|
#define ZoneColorV( varname, color ) varname.Color( color )
|
|
|
|
#define ZoneValue( value ) ___tracy_scoped_zone.Value( value )
|
|
|
|
#define ZoneValueV( varname, value ) varname.Value( value )
|
2021-02-16 19:38:54 +00:00
|
|
|
#define ZoneIsActive ___tracy_scoped_zone.IsActive()
|
|
|
|
#define ZoneIsActiveV( varname ) varname.IsActive()
|
2017-09-27 00:18:17 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
#define FrameMark tracy::Profiler::SendFrameMark( nullptr )
|
|
|
|
#define FrameMarkNamed( name ) tracy::Profiler::SendFrameMark( name )
|
|
|
|
#define FrameMarkStart( name ) tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgStart )
|
|
|
|
#define FrameMarkEnd( name ) tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgEnd )
|
2017-09-10 18:10:20 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
#define FrameImage( image, width, height, offset, flip ) tracy::Profiler::SendFrameImage( image, width, height, offset, flip )
|
2019-06-06 19:39:54 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
#define TracyLockable( type, varname ) tracy::Lockable<type> varname { [] () -> const tracy::SourceLocationData* { static constexpr tracy::SourceLocationData srcloc { nullptr, #type " " #varname, __FILE__, __LINE__, 0 }; return &srcloc; }() }
|
|
|
|
#define TracyLockableN( type, varname, desc ) tracy::Lockable<type> varname { [] () -> const tracy::SourceLocationData* { static constexpr tracy::SourceLocationData srcloc { nullptr, desc, __FILE__, __LINE__, 0 }; return &srcloc; }() }
|
|
|
|
#define TracySharedLockable( type, varname ) tracy::SharedLockable<type> varname { [] () -> const tracy::SourceLocationData* { static constexpr tracy::SourceLocationData srcloc { nullptr, #type " " #varname, __FILE__, __LINE__, 0 }; return &srcloc; }() }
|
|
|
|
#define TracySharedLockableN( type, varname, desc ) tracy::SharedLockable<type> varname { [] () -> const tracy::SourceLocationData* { static constexpr tracy::SourceLocationData srcloc { nullptr, desc, __FILE__, __LINE__, 0 }; return &srcloc; }() }
|
2017-10-04 13:41:02 +00:00
|
|
|
#define LockableBase( type ) tracy::Lockable<type>
|
2017-12-10 20:49:45 +00:00
|
|
|
#define SharedLockableBase( type ) tracy::SharedLockable<type>
|
2022-07-01 15:22:48 +00:00
|
|
|
#define LockMark( varname ) static constexpr tracy::SourceLocationData __tracy_lock_location_##varname { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; varname.Mark( &__tracy_lock_location_##varname )
|
|
|
|
#define LockableName( varname, txt, size ) varname.CustomName( txt, size )
|
2017-10-04 13:41:02 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
#define TracyPlot( name, val ) tracy::Profiler::PlotData( name, val )
|
|
|
|
#define TracyPlotConfig( name, type ) tracy::Profiler::ConfigurePlot( name, type )
|
2017-10-13 00:07:03 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
#define TracyAppInfo( txt, size ) tracy::Profiler::MessageAppInfo( txt, size )
|
2017-10-14 11:23:13 +00:00
|
|
|
|
2018-12-13 13:43:37 +00:00
|
|
|
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
2022-07-01 15:22:48 +00:00
|
|
|
# define TracyMessage( txt, size ) tracy::Profiler::Message( txt, size, TRACY_CALLSTACK )
|
|
|
|
# define TracyMessageL( txt ) tracy::Profiler::Message( txt, TRACY_CALLSTACK )
|
|
|
|
# define TracyMessageC( txt, size, color ) tracy::Profiler::MessageColor( txt, size, color, TRACY_CALLSTACK )
|
|
|
|
# define TracyMessageLC( txt, color ) tracy::Profiler::MessageColor( txt, color, TRACY_CALLSTACK )
|
|
|
|
|
|
|
|
# define TracyAlloc( ptr, size ) tracy::Profiler::MemAllocCallstack( ptr, size, TRACY_CALLSTACK, false )
|
|
|
|
# define TracyFree( ptr ) tracy::Profiler::MemFreeCallstack( ptr, TRACY_CALLSTACK, false )
|
|
|
|
# define TracySecureAlloc( ptr, size ) tracy::Profiler::MemAllocCallstack( ptr, size, TRACY_CALLSTACK, true )
|
|
|
|
# define TracySecureFree( ptr ) tracy::Profiler::MemFreeCallstack( ptr, TRACY_CALLSTACK, true )
|
|
|
|
|
|
|
|
# define TracyAllocN( ptr, size, name ) tracy::Profiler::MemAllocCallstackNamed( ptr, size, TRACY_CALLSTACK, false, name )
|
|
|
|
# define TracyFreeN( ptr, name ) tracy::Profiler::MemFreeCallstackNamed( ptr, TRACY_CALLSTACK, false, name )
|
|
|
|
# define TracySecureAllocN( ptr, size, name ) tracy::Profiler::MemAllocCallstackNamed( ptr, size, TRACY_CALLSTACK, true, name )
|
|
|
|
# define TracySecureFreeN( ptr, name ) tracy::Profiler::MemFreeCallstackNamed( ptr, TRACY_CALLSTACK, true, name )
|
2018-12-13 13:43:37 +00:00
|
|
|
#else
|
2022-07-01 15:22:48 +00:00
|
|
|
# define TracyMessage( txt, size ) tracy::Profiler::Message( txt, size, 0 )
|
|
|
|
# define TracyMessageL( txt ) tracy::Profiler::Message( txt, 0 )
|
|
|
|
# define TracyMessageC( txt, size, color ) tracy::Profiler::MessageColor( txt, size, color, 0 )
|
|
|
|
# define TracyMessageLC( txt, color ) tracy::Profiler::MessageColor( txt, color, 0 )
|
|
|
|
|
|
|
|
# define TracyAlloc( ptr, size ) tracy::Profiler::MemAlloc( ptr, size, false )
|
|
|
|
# define TracyFree( ptr ) tracy::Profiler::MemFree( ptr, false )
|
|
|
|
# define TracySecureAlloc( ptr, size ) tracy::Profiler::MemAlloc( ptr, size, true )
|
|
|
|
# define TracySecureFree( ptr ) tracy::Profiler::MemFree( ptr, true )
|
|
|
|
|
|
|
|
# define TracyAllocN( ptr, size, name ) tracy::Profiler::MemAllocNamed( ptr, size, false, name )
|
|
|
|
# define TracyFreeN( ptr, name ) tracy::Profiler::MemFreeNamed( ptr, false, name )
|
|
|
|
# define TracySecureAllocN( ptr, size, name ) tracy::Profiler::MemAllocNamed( ptr, size, true, name )
|
|
|
|
# define TracySecureFreeN( ptr, name ) tracy::Profiler::MemFreeNamed( ptr, true, name )
|
2018-12-13 13:43:37 +00:00
|
|
|
#endif
|
2018-06-19 17:38:56 +00:00
|
|
|
|
|
|
|
#ifdef TRACY_HAS_CALLSTACK
|
2022-07-01 15:22:48 +00:00
|
|
|
# define ZoneNamedS( varname, depth, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), depth, active )
|
|
|
|
# define ZoneNamedNS( varname, name, depth, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), depth, active )
|
|
|
|
# define ZoneNamedCS( varname, color, depth, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), depth, active )
|
|
|
|
# define ZoneNamedNCS( varname, name, color, depth, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::ScopedZone varname( &TracyConcat(__tracy_source_location,__LINE__), depth, active )
|
2018-08-13 12:47:52 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
# define ZoneTransientS( varname, depth, active ) tracy::ScopedZone varname( __LINE__, __FILE__, strlen( __FILE__ ), __FUNCTION__, strlen( __FUNCTION__ ), nullptr, 0, depth, active )
|
|
|
|
# define ZoneTransientNS( varname, name, depth, active ) tracy::ScopedZone varname( __LINE__, __FILE__, strlen( __FILE__ ), __FUNCTION__, strlen( __FUNCTION__ ), name, strlen( name ), depth, active )
|
2020-08-16 13:05:45 +00:00
|
|
|
|
2018-08-13 12:47:52 +00:00
|
|
|
# define ZoneScopedS( depth ) ZoneNamedS( ___tracy_scoped_zone, depth, true )
|
|
|
|
# define ZoneScopedNS( name, depth ) ZoneNamedNS( ___tracy_scoped_zone, name, depth, true )
|
|
|
|
# define ZoneScopedCS( color, depth ) ZoneNamedCS( ___tracy_scoped_zone, color, depth, true )
|
2020-06-06 04:30:16 +00:00
|
|
|
# define ZoneScopedNCS( name, color, depth ) ZoneNamedNCS( ___tracy_scoped_zone, name, color, depth, true )
|
2018-07-26 17:42:45 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
# define TracyAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth, false )
|
|
|
|
# define TracyFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth, false )
|
|
|
|
# define TracySecureAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth, true )
|
|
|
|
# define TracySecureFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth, true )
|
2019-11-14 22:50:52 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
# define TracyAllocNS( ptr, size, depth, name ) tracy::Profiler::MemAllocCallstackNamed( ptr, size, depth, false, name )
|
|
|
|
# define TracyFreeNS( ptr, depth, name ) tracy::Profiler::MemFreeCallstackNamed( ptr, depth, false, name )
|
|
|
|
# define TracySecureAllocNS( ptr, size, depth, name ) tracy::Profiler::MemAllocCallstackNamed( ptr, size, depth, true, name )
|
|
|
|
# define TracySecureFreeNS( ptr, depth, name ) tracy::Profiler::MemFreeCallstackNamed( ptr, depth, true, name )
|
2020-09-22 16:22:34 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
# define TracyMessageS( txt, size, depth ) tracy::Profiler::Message( txt, size, depth )
|
|
|
|
# define TracyMessageLS( txt, depth ) tracy::Profiler::Message( txt, depth )
|
|
|
|
# define TracyMessageCS( txt, size, color, depth ) tracy::Profiler::MessageColor( txt, size, color, depth )
|
|
|
|
# define TracyMessageLCS( txt, color, depth ) tracy::Profiler::MessageColor( txt, color, depth )
|
2018-06-19 17:38:56 +00:00
|
|
|
#else
|
2018-08-13 12:47:52 +00:00
|
|
|
# define ZoneNamedS( varname, depth, active ) ZoneNamed( varname, active )
|
|
|
|
# define ZoneNamedNS( varname, name, depth, active ) ZoneNamedN( varname, name, active )
|
|
|
|
# define ZoneNamedCS( varname, color, depth, active ) ZoneNamedC( varname, color, active )
|
|
|
|
# define ZoneNamedNCS( varname, name, color, depth, active ) ZoneNamedNC( varname, name, color, active )
|
|
|
|
|
2020-08-16 13:05:45 +00:00
|
|
|
# define ZoneTransientS( varname, depth, active ) ZoneTransient( varname, active )
|
|
|
|
# define ZoneTransientNS( varname, name, depth, active ) ZoneTransientN( varname, name, active )
|
|
|
|
|
2018-08-13 16:32:27 +00:00
|
|
|
# define ZoneScopedS( depth ) ZoneScoped
|
|
|
|
# define ZoneScopedNS( name, depth ) ZoneScopedN( name )
|
|
|
|
# define ZoneScopedCS( color, depth ) ZoneScopedC( color )
|
|
|
|
# define ZoneScopedNCS( name, color, depth ) ZoneScopedNC( name, color )
|
2018-06-21 22:56:01 +00:00
|
|
|
|
2018-06-19 17:38:56 +00:00
|
|
|
# define TracyAllocS( ptr, size, depth ) TracyAlloc( ptr, size )
|
|
|
|
# define TracyFreeS( ptr, depth ) TracyFree( ptr )
|
2020-06-23 23:33:26 +00:00
|
|
|
# define TracySecureAllocS( ptr, size, depth ) TracySecureAlloc( ptr, size )
|
|
|
|
# define TracySecureFreeS( ptr, depth ) TracySecureFree( ptr )
|
2019-11-14 22:50:52 +00:00
|
|
|
|
2020-09-22 16:22:34 +00:00
|
|
|
# define TracyAllocNS( ptr, size, depth, name ) TracyAlloc( ptr, size, name )
|
|
|
|
# define TracyFreeNS( ptr, depth, name ) TracyFree( ptr, name )
|
|
|
|
# define TracySecureAllocNS( ptr, size, depth, name ) TracySecureAlloc( ptr, size, name )
|
|
|
|
# define TracySecureFreeNS( ptr, depth, name ) TracySecureFree( ptr, name )
|
|
|
|
|
2019-11-14 22:50:52 +00:00
|
|
|
# define TracyMessageS( txt, size, depth ) TracyMessage( txt, size )
|
|
|
|
# define TracyMessageLS( txt, depth ) TracyMessageL( txt )
|
|
|
|
# define TracyMessageCS( txt, size, color, depth ) TracyMessageC( txt, size, color )
|
|
|
|
# define TracyMessageLCS( txt, color, depth ) TracyMessageLC( txt, color )
|
2018-06-19 17:38:56 +00:00
|
|
|
#endif
|
2018-03-31 19:56:05 +00:00
|
|
|
|
2022-07-01 15:22:48 +00:00
|
|
|
#define TracyParameterRegister( cb ) tracy::Profiler::ParameterRegister( cb )
|
|
|
|
#define TracyParameterSetup( idx, name, isBool, val ) tracy::Profiler::ParameterSetup( idx, name, isBool, val )
|
2020-07-16 09:24:44 +00:00
|
|
|
#define TracyIsConnected tracy::GetProfiler().IsConnected()
|
2019-11-25 22:59:48 +00:00
|
|
|
|
2021-11-01 22:56:19 +00:00
|
|
|
#ifdef TRACY_FIBERS
|
2022-07-01 15:22:48 +00:00
|
|
|
# define TracyFiberEnter( fiber ) tracy::Profiler::EnterFiber( fiber )
|
|
|
|
# define TracyFiberLeave tracy::Profiler::LeaveFiber()
|
2021-11-01 22:56:19 +00:00
|
|
|
#endif
|
|
|
|
|
2017-09-10 18:10:20 +00:00
|
|
|
#endif
|
2017-09-18 17:08:54 +00:00
|
|
|
|
|
|
|
#endif
|