mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Rename client's SourceLocation to SourceLocationData.
This commit is contained in:
@@ -17,7 +17,7 @@ template<class T>
|
||||
class Lockable
|
||||
{
|
||||
public:
|
||||
tracy_force_inline Lockable( const SourceLocation* srcloc )
|
||||
tracy_force_inline Lockable( const SourceLocationData* srcloc )
|
||||
: m_id( s_lockCounter.fetch_add( 1, std::memory_order_relaxed ) )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
, m_lockCount( 0 )
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
tracy_force_inline void Mark( const SourceLocation* srcloc )
|
||||
tracy_force_inline void Mark( const SourceLocationData* srcloc )
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
const auto active = m_active.load( std::memory_order_relaxed );
|
||||
@@ -191,7 +191,7 @@ template<class T>
|
||||
class SharedLockable
|
||||
{
|
||||
public:
|
||||
tracy_force_inline SharedLockable( const SourceLocation* srcloc )
|
||||
tracy_force_inline SharedLockable( const SourceLocationData* srcloc )
|
||||
: m_id( s_lockCounter.fetch_add( 1, std::memory_order_relaxed ) )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
, m_lockCount( 0 )
|
||||
@@ -433,7 +433,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
tracy_force_inline void Mark( const SourceLocation* srcloc )
|
||||
tracy_force_inline void Mark( const SourceLocationData* srcloc )
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
const auto active = m_active.load( std::memory_order_relaxed );
|
||||
|
||||
@@ -629,7 +629,7 @@ void Profiler::SendString( uint64_t str, const char* ptr, QueueType type )
|
||||
|
||||
void Profiler::SendSourceLocation( uint64_t ptr )
|
||||
{
|
||||
auto srcloc = (const SourceLocation*)ptr;
|
||||
auto srcloc = (const SourceLocationData*)ptr;
|
||||
QueueItem item;
|
||||
MemWrite( &item.hdr.type, QueueType::SourceLocation );
|
||||
MemWrite( &item.srcloc.name, (uint64_t)srcloc->name );
|
||||
@@ -797,7 +797,7 @@ void Profiler::CalibrateTimer()
|
||||
class FakeZone
|
||||
{
|
||||
public:
|
||||
FakeZone( const SourceLocation* srcloc ) : m_id( (uint64_t)srcloc ) {}
|
||||
FakeZone( const SourceLocationData* srcloc ) : m_id( (uint64_t)srcloc ) {}
|
||||
~FakeZone() {}
|
||||
|
||||
private:
|
||||
@@ -814,7 +814,7 @@ void Profiler::CalibrateDelay()
|
||||
moodycamel::ConcurrentQueue<QueueItem>::ExplicitProducer* ptoken = s_queue.get_explicit_producer( ptoken_detail );
|
||||
for( int i=0; i<Iterations; i++ )
|
||||
{
|
||||
static const tracy::SourceLocation __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
||||
static const tracy::SourceLocationData __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
||||
{
|
||||
Magic magic;
|
||||
auto& tail = ptoken->get_tail_index();
|
||||
@@ -850,13 +850,13 @@ void Profiler::CalibrateDelay()
|
||||
const auto f0 = GetTime();
|
||||
for( int i=0; i<Iterations; i++ )
|
||||
{
|
||||
static const tracy::SourceLocation __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
||||
static const tracy::SourceLocationData __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
||||
FakeZone ___tracy_scoped_zone( &__tracy_source_location );
|
||||
}
|
||||
const auto t0 = GetTime();
|
||||
for( int i=0; i<Iterations; i++ )
|
||||
{
|
||||
static const tracy::SourceLocation __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
||||
static const tracy::SourceLocationData __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
||||
{
|
||||
Magic magic;
|
||||
auto& tail = ptoken->get_tail_index();
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace tracy
|
||||
|
||||
class Socket;
|
||||
|
||||
struct SourceLocation
|
||||
struct SourceLocationData
|
||||
{
|
||||
const char* name;
|
||||
const char* function;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace tracy
|
||||
class ScopedZone
|
||||
{
|
||||
public:
|
||||
tracy_force_inline ScopedZone( const SourceLocation* srcloc )
|
||||
tracy_force_inline ScopedZone( const SourceLocationData* srcloc )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
: m_active( s_profiler.IsConnected() )
|
||||
#endif
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
tail.store( magic + 1, std::memory_order_release );
|
||||
}
|
||||
|
||||
tracy_force_inline ScopedZone( const SourceLocation* srcloc, int depth )
|
||||
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, int depth )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
: m_active( s_profiler.IsConnected() )
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user