More force inlining.

This commit is contained in:
Bartosz Taudul 2017-10-03 15:10:25 +02:00
parent fe41185dc0
commit e01d378f52
2 changed files with 9 additions and 9 deletions

View File

@ -39,7 +39,7 @@ public:
Profiler();
~Profiler();
static int64_t GetTime( int8_t& cpu )
static tracy_force_inline int64_t GetTime( int8_t& cpu )
{
#if defined _MSC_VER || defined __CYGWIN__
unsigned int ui;
@ -52,11 +52,11 @@ public:
#endif
}
static QueueItem* StartItem( Magic& magic ) { return s_queue.enqueue_begin( s_token, magic ); }
static void FinishItem( Magic magic ) { s_queue.enqueue_finish( s_token, magic ); }
static uint64_t GetNewId() { return s_id.fetch_add( 1, std::memory_order_relaxed ); }
static tracy_force_inline QueueItem* StartItem( Magic& magic ) { return s_queue.enqueue_begin( s_token, magic ); }
static tracy_force_inline void FinishItem( Magic magic ) { s_queue.enqueue_finish( s_token, magic ); }
static tracy_force_inline uint64_t GetNewId() { return s_id.fetch_add( 1, std::memory_order_relaxed ); }
static void FrameMark()
static tracy_force_inline void FrameMark()
{
int8_t cpu;
Magic magic;

View File

@ -13,7 +13,7 @@ namespace tracy
class ScopedZone
{
public:
ScopedZone( const SourceLocation* srcloc )
tracy_force_inline ScopedZone( const SourceLocation* srcloc )
: m_id( Profiler::GetNewId() )
{
Magic magic;
@ -26,7 +26,7 @@ public:
Profiler::FinishItem( magic );
}
~ScopedZone()
tracy_force_inline ~ScopedZone()
{
Magic magic;
auto item = Profiler::StartItem( magic );
@ -36,7 +36,7 @@ public:
Profiler::FinishItem( magic );
}
void Text( const char* txt, size_t size )
tracy_force_inline void Text( const char* txt, size_t size )
{
Magic magic;
auto ptr = new char[size+1];
@ -49,7 +49,7 @@ public:
Profiler::FinishItem( magic );
}
void Name( const char* name )
tracy_force_inline void Name( const char* name )
{
Magic magic;
auto item = Profiler::StartItem( magic );