mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Automatically create profiler instance.
This commit is contained in:
parent
de66ec5332
commit
0331d548d2
@ -1,6 +1,13 @@
|
||||
#ifndef __TRACY_HPP__
|
||||
#define __TRACY_HPP__
|
||||
|
||||
#ifdef TRACY_DISABLE
|
||||
|
||||
#define ZoneScoped
|
||||
#define FrameMark
|
||||
|
||||
#else
|
||||
|
||||
#include "TracyProfiler.hpp"
|
||||
#include "TracyScoped.hpp"
|
||||
|
||||
@ -8,3 +15,5 @@
|
||||
#define FrameMark tracy::Profiler::FrameMark();
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -32,6 +32,10 @@ static moodycamel::ProducerToken& GetToken()
|
||||
extern const char* PointerCheckA;
|
||||
const char* PointerCheckB = "tracy";
|
||||
|
||||
#ifndef TRACY_DISABLE
|
||||
Profiler s_profiler;
|
||||
#endif
|
||||
|
||||
static Profiler* s_instance = nullptr;
|
||||
|
||||
Profiler::Profiler()
|
||||
|
Loading…
Reference in New Issue
Block a user