mk_profiler_availablefunction
bool mk_profiler_available(void)Check if profiler is available (compiled with MODKIT_ENABLE_PROFILER).
Returns true if profiler support is compiled in
#include <modkit/profiler.h>2 functions · 15 macros
Tracy profiler integration for modkit.
When MODKIT_HAS_PROFILER is enabled, these macros integrate with Tracy for real-time profiling. When disabled, they compile to nothing. Usage (C API - requires explicit begin/end): void my_function(void) { MK_PROFILE_ZONE_BEGIN(z); // Begin profiling zone // ... work ... MK_PROFILE_ZONE_END(z); // End profiling zone } void named_zone_example(void) { MK_PROFILE_ZONE_BEGIN_N(z, "Loading Assets"); // ... loading code ... MK_PROFILE_ZONE_END(z); } Build with profiler: ./scripts/build-linux.sh profiler To view profiling data, run the Tracy profiler GUI and connect to your app. Download Tracy from: https://github.com/wolfpld/tracy/releases
mk_profiler_availablefunctionbool mk_profiler_available(void)Check if profiler is available (compiled with MODKIT_ENABLE_PROFILER).
Returns true if profiler support is compiled in
mk_profiler_connectedfunctionbool mk_profiler_connected(void)Check whether a Tracy profiler is currently connected.
Returns true only when profiler support is compiled in and a client is connected
MK_PROFILE_ALLOCdefineMK_PROFILE_ALLOC(ptr, size)Constant for profile alloc.
MK_PROFILE_FRAMEdefineMK_PROFILE_FRAME()Constant for profile frame.
MK_PROFILE_FRAME_NAMEDdefineMK_PROFILE_FRAME_NAMED(name)Constant for profile frame named.
MK_PROFILE_FREEdefineMK_PROFILE_FREE(ptr)Constant for profile free.
MK_PROFILE_GPU_ZONEdefineMK_PROFILE_GPU_ZONE(name)Constant for profile GPU zone.
MK_PROFILE_GPU_ZONE_ENDdefineMK_PROFILE_GPU_ZONE_END()Constant for profile GPU zone end.
MK_PROFILE_MESSAGEdefineMK_PROFILE_MESSAGE(text, len)Constant for profile message.
MK_PROFILE_PLOTdefineMK_PROFILE_PLOT(name, value)Constant for profile plot.
MK_PROFILE_THREAD_NAMEdefineMK_PROFILE_THREAD_NAME(name)Constant for profile thread name.
MK_PROFILE_ZONE_BEGINdefineMK_PROFILE_ZONE_BEGIN(ctx)Constant for profile zone begin.
MK_PROFILE_ZONE_BEGIN_NdefineMK_PROFILE_ZONE_BEGIN_N(ctx, name)Constant for profile zone begin n.
MK_PROFILE_ZONE_BEGIN_NCdefineMK_PROFILE_ZONE_BEGIN_NC(ctx, name, c)Constant for profile zone begin nc.
MK_PROFILE_ZONE_ENDdefineMK_PROFILE_ZONE_END(ctx)Constant for profile zone end.
MK_PROFILE_ZONE_TEXTdefineMK_PROFILE_ZONE_TEXT(ctx, text, len)Constant for profile zone text.
MK_PROFILE_ZONE_VALUEdefineMK_PROFILE_ZONE_VALUE(ctx, value)Constant for profile zone value.