2017-09-10 18:10:20 +00:00
|
|
|
#ifndef __TRACY_HPP__
|
|
|
|
#define __TRACY_HPP__
|
|
|
|
|
2017-09-18 17:08:54 +00:00
|
|
|
#ifdef TRACY_DISABLE
|
|
|
|
|
|
|
|
#define ZoneScoped
|
2017-09-25 20:46:14 +00:00
|
|
|
#define ZoneScopedC(x)
|
|
|
|
|
2017-09-28 17:20:19 +00:00
|
|
|
#define ZoneText(x,y)
|
2017-09-28 17:28:24 +00:00
|
|
|
#define ZoneName(x)
|
2017-09-28 17:20:19 +00:00
|
|
|
|
2017-09-18 17:08:54 +00:00
|
|
|
#define FrameMark
|
|
|
|
|
2017-10-04 13:41:02 +00:00
|
|
|
#define TracyLockable( type, varname ) type varname;
|
|
|
|
#define LockableBase( type ) type
|
|
|
|
|
2017-09-18 17:08:54 +00:00
|
|
|
#else
|
|
|
|
|
2017-10-04 13:41:02 +00:00
|
|
|
#include "TracyLock.hpp"
|
2017-09-15 22:30:27 +00:00
|
|
|
#include "TracyProfiler.hpp"
|
2017-09-10 18:10:20 +00:00
|
|
|
#include "TracyScoped.hpp"
|
|
|
|
|
2017-09-29 16:29:32 +00:00
|
|
|
#define ZoneScoped static const tracy::SourceLocation __tracy_source_location { __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::ScopedZone ___tracy_scoped_zone( &__tracy_source_location );
|
|
|
|
#define ZoneScopedC( color ) static const tracy::SourceLocation __tracy_source_location { __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::ScopedZone ___tracy_scoped_zone( &__tracy_source_location );
|
2017-09-25 20:46:14 +00:00
|
|
|
|
2017-09-27 00:18:17 +00:00
|
|
|
#define ZoneText( txt, size ) ___tracy_scoped_zone.Text( txt, size );
|
2017-09-28 17:28:24 +00:00
|
|
|
#define ZoneName( name ) ___tracy_scoped_zone.Name( name );
|
2017-09-27 00:18:17 +00:00
|
|
|
|
2017-09-15 22:30:27 +00:00
|
|
|
#define FrameMark tracy::Profiler::FrameMark();
|
2017-09-10 18:10:20 +00:00
|
|
|
|
2017-10-04 13:41:02 +00:00
|
|
|
#define TracyLockable( type, varname ) tracy::Lockable<type> varname { [] () -> const tracy::SourceLocation* { static const tracy::SourceLocation srcloc { #varname, __FILE__, __LINE__, 0 }; return &srcloc; }() };
|
|
|
|
#define LockableBase( type ) tracy::Lockable<type>
|
|
|
|
|
2017-09-10 18:10:20 +00:00
|
|
|
#endif
|
2017-09-18 17:08:54 +00:00
|
|
|
|
|
|
|
#endif
|