mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
More force inlining.
This commit is contained in:
parent
fe41185dc0
commit
e01d378f52
@ -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;
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user