3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/memory/MemoryCategory.h"
19namespace Core::Profile {
23MCNAPI uchar createGPUContext(
27 bool supportsMultithreadedRendering,
28 bool allowContextCallibration
31MCNAPI
void emitGPUTiming(uint gpuEvent, int64 beginTime, int64 endTime);
34enterCPUProfile(::Bedrock::Profile::ScopeStackStorage& scope, ::Core::Profile::CPUProfileToken
const& token);
37MCNAPI
void enterCPUProfileDynamic(
38 ::Bedrock::Profile::ScopeStackStorage& scope,
39 ::Core::Profile::CPUProfileToken
const& token,
40 ::Bedrock::Profiler::details::DynamicProfLabel dynamicLabel
44MCNAPI uint enterGPUProfile(
45 ::Bedrock::Profile::ScopeStackStorage& scope,
46 ::Core::Profile::GPUProfileToken
const& token,
51MCNAPI ::Core::Profile::ProfileGroup& findOrCreateGroup(::std::string_view name, uint color);
54MCNAPI ::Core::Profile::CPUProfileToken
55generateCPUProfileToken(
char const* group,
char const* label, uint color, ::brstd::source_location
const& location);
57MCNAPI ::Core::Profile::GPUProfileToken generateGPUProfileTokenDynamic(
61 ::brstd::source_location
const& location
64MCNAPI
void getFileOpenStats(::Core::Profile::FileCounters& reads, ::Core::Profile::FileCounters& writes);
66MCNAPI int64 getProfilerTimestamp();
69MCNAPI
void initializeProfile();
73leaveCPUProfile(::Bedrock::Profile::ScopeStackStorage& scope, ::Core::Profile::CPUProfileToken
const& token);
75MCNAPI
void leaveGPUProfile(::Bedrock::Profile::ScopeStackStorage& scope, uint gpuEvent);
78MCNAPI
void onFileOpenFailed(
bool isReadOnly);
80MCNAPI
void onFileOpenRequest(
bool isReadOnly);
82MCNAPI
void onFrameTransition(uchar previousFrameType);
86onHeapAllocation(
void const* pointer, uint64 size, ::Memory::MemoryCategory category,
char const* categoryName);
88MCNAPI
void onHeapFree(
void const* pointer, uint64 size, ::Memory::MemoryCategory category,
char const* categoryName);
91MCNAPI
void onMainThreadCreate();
93MCNAPI
void onMainThreadDestroy();
95MCNAPI
void shutdownProfile();
98MCNAPI
void syncGPUTiming(uchar contextId, int64 cpuTimestamp, int64 gpuTimestamp, int64 cpuDeltaNS);
104MCNAPI
bool& ProfilerInitialized();
Definition ScopeStackStorage.h:7
Definition CPUProfileToken.h:7
Definition GPUProfileToken.h:10
Definition ProfileGroup.h:7
Definition DynamicProfLabel.h:7
Definition FileCounters.h:7
Definition source_location.h:7