GlistEngine
Loading...
Searching...
No Matches
gTracy.h
Go to the documentation of this file.
1//
2// Created by Metehan Gezer on 01/09/2025.
3//
4
5#ifndef MARTYR_GTRACY_H
6#define MARTYR_GTRACY_H
7
8// Tracy is a profiler for C++
9// https://github.com/wolfpld/tracy
10
11#ifdef TRACY_ENABLE
12#include "tracy/Tracy.hpp"
13#define G_PROFILE_FRAME_MARK() FrameMark
14#define G_PROFILE_ZONE_SCOPED() ZoneScoped
15#define G_PROFILE_ZONE_SCOPED_N(name) ZoneScopedN(name)
16#define G_PROFILE_LOCKABLE(type, varname) TracyLockable(type, varname)
17#define G_PROFILE_MESSAGE(text, size) TracyMessage(text, size)
18#define G_PROFILE_MESSAGE_L(text) TracyMessageL(text)
19#define G_PROFILE_ALLOC(ptr, size) TracyAlloc(ptr, size)
20#define G_PROFILE_FREE(ptr) TracyFree(ptr)
21#define G_PROFILE_ZONE_VALUE(value) ZoneValue(value)
22#else
23#define G_PROFILE_FRAME_MARK()
24#define G_PROFILE_ZONE_SCOPED()
25#define G_PROFILE_ZONE_SCOPED_N(name)
26#define G_PROFILE_LOCKABLE(type, varname) type varname
27#define G_PROFILE_MESSAGE(text, size)
28#define G_PROFILE_MESSAGE_L(text)
29#define G_PROFILE_ALLOC(ptr, size)
30#define G_PROFILE_FREE(ptr)
31#define G_PROFILE_ZONE_VALUE(value)
32#endif
33
34#endif //MARTYR_GTRACY_H