mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
997f0c64c3
Pointers can't be stored as pointers, as that would cause mismatch in wire protocol between 32 and 64 bit builds.
32 lines
501 B
C++
Executable File
32 lines
501 B
C++
Executable File
#ifndef __TRACYSCOPED_HPP__
|
|
#define __TRACYSCOPED_HPP__
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "TracyProfiler.hpp"
|
|
|
|
namespace tracy
|
|
{
|
|
|
|
class ScopedZone
|
|
{
|
|
public:
|
|
ScopedZone( const char* file, const char* function, uint32_t line )
|
|
: m_id( Profiler::GetNewId() )
|
|
{
|
|
Profiler::ZoneBegin( QueueZoneBegin { m_id, (uint64_t)file, (uint64_t)function, line } );
|
|
}
|
|
|
|
~ScopedZone()
|
|
{
|
|
Profiler::ZoneEnd( QueueZoneEnd { m_id } );
|
|
}
|
|
|
|
private:
|
|
uint64_t m_id;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|