LeviLamina
Loading...
Searching...
No Matches
ProfileClient.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/memory/MemoryCategory.h"
7#include "mc/deps/profiler/CounterDisplayFormat.h"
8#include "mc/deps/profiler/FileExtension.h"
9#include "mc/deps/profiler/LegacyCounterFlags.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace Bedrock::Profile { class ScopeStackStorage; }
14namespace Bedrock::Profiler::details { struct DynamicProfLabel; }
15namespace Bedrock::Profiler::details { struct StaticProfLabel; }
16namespace Core::Profile { class CPUProfileToken; }
17namespace Core::Profile { class CounterToken; }
18namespace Core::Profile { class GPUProfileToken; }
19namespace brstd { struct source_location; }
20// clang-format on
21
22namespace Core::Profile {
23
25public:
26 // virtual functions
27 // NOLINTBEGIN
28 virtual ~ProfileClient() = default;
29
30 virtual void initializeProfile();
31
32 virtual void shutdownProfile();
33
34 virtual void profileFlip();
35
36 virtual uint getMaxTokens() const;
37
38 virtual void onThreadCreate(char const*);
39
40 virtual void onThreadDestroy();
41
42 virtual void onMainThreadCreate();
43
44 virtual void onHeapAllocation(void const*, uint64, ::Memory::MemoryCategory, char const*);
45
46 virtual void onHeapFree(void const*, uint64, ::Memory::MemoryCategory, char const*);
47
49
50 virtual void enterCPUProfileDynamic(
54 );
55
57
58 virtual uchar createGPUContext(char const*, int64, float, bool, bool);
59
60 virtual uint
62
63 virtual void leaveGPUProfile(::Bedrock::Profile::ScopeStackStorage&, uint);
64
65 virtual void emitGPUTiming(uint, int64, int64);
66
67 virtual void syncGPUTiming(uchar, int64, int64, int64);
68
69 virtual void counterAdd(::Core::Profile::CounterToken const&, int64);
70
71 virtual void counterSet(::Core::Profile::CounterToken const&, int64);
72
73 virtual void beginCapture(char const*);
74
75 virtual void endCapture(bool);
76
77 virtual void logCaptureResults();
78
79 virtual bool isCaptureEnding();
80
81 virtual void setMarker(char const*, uint) const;
82
83 virtual void generateCPUProfileTokenStatic(
85 char const* group,
87 uint color,
88 ::brstd::source_location const& location
89 );
90
91 virtual void generateCPUProfileTokenLegacy(
93 char const*,
94 char const*,
95 uint,
97 );
98
99 virtual void generateCPUProfileTokenDynamic(
101 char const*,
102 uint,
104 );
105
106 virtual void generateGPUProfileToken(
108 char const*,
109 char const*,
110 uint,
112 );
113
114 virtual void generateGPUProfileTokenDynamic(
116 char const*,
117 char const*,
118 uint,
120 );
121
122 virtual void generateCounterToken(::Core::Profile::CounterToken& target, char const* label);
123
124 virtual void generateCounterTokenWithConfig(
126 char const*,
127 ::Core::Profile::CounterDisplayFormat,
128 int64,
129 ::Core::Profile::LegacyCounterFlags
130 );
131
132 virtual int64 getProfilerTimestamp();
133
134 virtual void dumpFile(char const*, ::Core::Profile::FileExtension);
135 // NOLINTEND
136
137public:
138 // virtual function thunks
139 // NOLINTBEGIN
140 MCNAPI void $initializeProfile();
141
142 MCNAPI void $shutdownProfile();
143
144 MCNAPI void $profileFlip();
145
146 MCNAPI uint $getMaxTokens() const;
147
148 MCNAPI void $onThreadCreate(char const*);
149
150 MCNAPI void $onThreadDestroy();
151
152 MCNAPI void $onMainThreadCreate();
153
154 MCNAPI void $onHeapAllocation(void const*, uint64, ::Memory::MemoryCategory, char const*);
155
156 MCNAPI void $onHeapFree(void const*, uint64, ::Memory::MemoryCategory, char const*);
157
159
164 );
165
167
168 MCNAPI uchar $createGPUContext(char const*, int64, float, bool, bool);
169
170 MCNAPI uint
172
174
175 MCNAPI void $emitGPUTiming(uint, int64, int64);
176
177 MCNAPI void $syncGPUTiming(uchar, int64, int64, int64);
178
179 MCNAPI void $counterAdd(::Core::Profile::CounterToken const&, int64);
180
181 MCNAPI void $counterSet(::Core::Profile::CounterToken const&, int64);
182
183 MCNAPI void $beginCapture(char const*);
184
185 MCNAPI void $endCapture(bool);
186
187 MCNAPI void $logCaptureResults();
188
189 MCNAPI bool $isCaptureEnding();
190
191 MCNAPI void $setMarker(char const*, uint) const;
192
195 char const* group,
197 uint color,
198 ::brstd::source_location const& location
199 );
200
203 char const*,
204 char const*,
205 uint,
207 );
208
211 char const*,
212 uint,
214 );
215
218 char const*,
219 char const*,
220 uint,
222 );
223
226 char const*,
227 char const*,
228 uint,
230 );
231
232 MCNAPI void $generateCounterToken(::Core::Profile::CounterToken& target, char const* label);
233
236 char const*,
237 ::Core::Profile::CounterDisplayFormat,
238 int64,
239 ::Core::Profile::LegacyCounterFlags
240 );
241
242 MCNAPI int64 $getProfilerTimestamp();
243
244 MCNAPI void $dumpFile(char const*, ::Core::Profile::FileExtension);
245
246
247 // NOLINTEND
248};
249
250} // namespace Core::Profile
Definition ScopeStackStorage.h:7
Definition CPUProfileToken.h:7
Definition CounterToken.h:7
Definition GPUProfileToken.h:10
Definition ProfileClient.h:24
MCAPI void $generateCPUProfileTokenDynamic(::Core::Profile::CPUProfileToken &, char const *, uint, ::brstd::source_location const &)
MCAPI void $dumpFile(char const *, ::Core::Profile::FileExtension)
MCAPI void $generateCPUProfileTokenLegacy(::Core::Profile::CPUProfileToken &, char const *, char const *, uint, ::brstd::source_location const &)
MCAPI uchar $createGPUContext(char const *, int64, float, bool, bool)
MCAPI void $counterSet(::Core::Profile::CounterToken const &, int64)
MCAPI void $generateCPUProfileTokenStatic(::Core::Profile::CPUProfileToken &target, char const *group, ::Bedrock::Profiler::details::StaticProfLabel label, uint color, ::brstd::source_location const &location)
MCAPI void $beginCapture(char const *)
MCAPI void $onHeapFree(void const *, uint64, ::Memory::MemoryCategory, char const *)
MCAPI void $generateCounterTokenWithConfig(::Core::Profile::CounterToken &, char const *, ::Core::Profile::CounterDisplayFormat, int64, ::Core::Profile::LegacyCounterFlags)
MCAPI void $leaveCPUProfile(::Bedrock::Profile::ScopeStackStorage &, ::Core::Profile::CPUProfileToken const &)
MCAPI void $emitGPUTiming(uint, int64, int64)
MCAPI void $enterCPUProfileDynamic(::Bedrock::Profile::ScopeStackStorage &scope, ::Core::Profile::CPUProfileToken const &token, ::Bedrock::Profiler::details::DynamicProfLabel)
MCAPI void $onHeapAllocation(void const *, uint64, ::Memory::MemoryCategory, char const *)
MCAPI void $syncGPUTiming(uchar, int64, int64, int64)
MCAPI uint $enterGPUProfile(::Bedrock::Profile::ScopeStackStorage &, ::Core::Profile::GPUProfileToken const &, uchar)
MCAPI void $generateCounterToken(::Core::Profile::CounterToken &target, char const *label)
MCAPI int64 $getProfilerTimestamp()
MCAPI uint $getMaxTokens() const
MCAPI void $generateGPUProfileToken(::Core::Profile::GPUProfileToken &, char const *, char const *, uint, ::brstd::source_location const &)
MCAPI void $leaveGPUProfile(::Bedrock::Profile::ScopeStackStorage &, uint)
MCAPI void $counterAdd(::Core::Profile::CounterToken const &, int64)
MCAPI void $setMarker(char const *, uint) const
MCAPI void $onThreadCreate(char const *)
MCAPI void $endCapture(bool)
MCAPI void $enterCPUProfile(::Bedrock::Profile::ScopeStackStorage &, ::Core::Profile::CPUProfileToken const &)
MCAPI void $generateGPUProfileTokenDynamic(::Core::Profile::GPUProfileToken &, char const *, char const *, uint, ::brstd::source_location const &)
Definition DynamicProfLabel.h:7
Definition StaticProfLabel.h:7
Definition source_location.h:7