Enum in ldk_profiler.h

LDKProfilerZoneKind

typedef enum LDKProfilerZoneKind{
  LDK_PROFILER_ZONE_USER=0,
  LDK_PROFILER_ZONE_FRAME,
  LDK_PROFILER_ZONE_PHASE,
  LDK_PROFILER_ZONE_BUCKET,
  LDK_PROFILER_ZONE_SYSTEM
}LDKProfilerZoneKind;
Struct in ldk_profiler.h

LDKProfilerSource

typedef struct LDKProfilerSource{
  volatile i32 id;
}LDKProfilerSource;
Struct in ldk_profiler.h

LDKProfilerCounter

typedef struct LDKProfilerCounter{
  volatile i32 id;
}LDKProfilerCounter;
Function in ldk_profiler.h

ldk_profiler_initialize

Initialize the profiler.

LDK_API bool ldk_profiler_initialize(const char *runtree_path);

Parameters

const char *runtree_path
Path of the runtree.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_profiler.h

ldk_profiler_terminate

Shut down the profiler.

LDK_API void ldk_profiler_terminate(void);
Function in ldk_profiler.h

ldk_profiler_capture_start

Start the profiler capture.

LDK_API bool ldk_profiler_capture_start(const char *path);

Parameters

const char *path
Path identifying the file or resource.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_profiler.h

ldk_profiler_capture_stop

Stop the profiler capture.

LDK_API void ldk_profiler_capture_stop(void);
Function in ldk_profiler.h

ldk_profiler_capture_collect

Collect the current profiler sample data.

LDK_API void ldk_profiler_capture_collect(bool enabled);

Parameters

bool enabled
Enabled used by this operation.
Function in ldk_profiler.h

ldk_profiler_capture_toggle

Toggle profiler capture state.

LDK_API void ldk_profiler_capture_toggle(void);
Function in ldk_profiler.h

ldk_profiler_capture_is_active

Check whether the profiler capture is active.

LDK_API bool ldk_profiler_capture_is_active(void);

Returns

True when the queried condition holds; false otherwise.

Function in ldk_profiler.h

ldk_profiler_capture_path_get

Get the profiler capture path.

LDK_API const char * ldk_profiler_capture_path_get(void);

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_profiler.h

ldk_profiler_frame_begin

Begin the profiler frame.

LDK_API void ldk_profiler_frame_begin(void);
Function in ldk_profiler.h

ldk_profiler_frame_end

Finish the profiler frame.

LDK_API void ldk_profiler_frame_end(void);
Function in ldk_profiler.h

ldk_profiler_zone_begin_source

Begin a profiling zone tagged with a source location.

LDK_API void ldk_profiler_zone_begin_source(
 LDKProfilerSource *source,
 LDKProfilerZoneKind kind,
 const char *name,
 const char *file,
 const char *function,
 u32 line
);

Parameters

LDKProfilerSource *source
Source object or source data for this operation.
LDKProfilerZoneKind kind
Kind used by this operation.
const char *name
Name identifying the object or setting.
const char *file
File used by this operation.
const char *function
Function to run as a scheduled job.
u32 line
Line used by this operation.
Function in ldk_profiler.h

ldk_profiler_zone_end

Finish the profiler zone.

LDK_API void ldk_profiler_zone_end(void);
Function in ldk_profiler.h

ldk_profiler_counter_set_source

Assign a profiler counter value at a source location.

LDK_API void ldk_profiler_counter_set_source(
 LDKProfilerCounter *counter,
 const char *name,
 double value
);

Parameters

LDKProfilerCounter *counter
Counter used by this operation.
const char *name
Name identifying the object or setting.
double value
Input value or current widget value.
Function in ldk_profiler.h

ldk_profiler_counter_add_source

Increment a profiler counter at a source location.

LDK_API void ldk_profiler_counter_add_source(
 LDKProfilerCounter *counter,
 const char *name,
 double value
);

Parameters

LDKProfilerCounter *counter
Counter used by this operation.
const char *name
Name identifying the object or setting.
double value
Input value or current widget value.
Function in ldk_profiler.h

ldk_profiler_thread_name_set

Set the profiler thread name.

LDK_API void ldk_profiler_thread_name_set(const char *name);

Parameters

const char *name
Name identifying the object or setting.
Macro in ldk_profiler.h

LDK_PROFILE_CONCAT_INNER

#define LDK_PROFILE_CONCAT_INNER(a, b) a##b