carb::profiler::IProfileMonitor

Defined in carb/profiler/IProfileMonitor.h

struct carb::profiler::IProfileMonitor

Defines an interface to monitor profiling events.

Public Members

ProfileEvents (*getLastProfileEvents)()

Returns the profiled events for the previous frame (up to CARB_PROFILE_FRAME()).

Returns

an opaque pointer that refers to the previous frame’s profiling information. This pointer must be released with releaseLastProfileEvents() when the caller is finished with it.

size_t (*getLastProfileEventCount)(ProfileEvents events)

Returns the number of profiling events for a ProfileEvents instance.

Parameters

events – The ProfileEvents instance returned from getLastProfileEvents().

Returns

The number of profiling events in the array returned by getLastProfileEventsData().

ProfileEvent *(*getLastProfileEventsData)(ProfileEvents events)

Returns an array of profiling events for a ProfileEvents instance.

Parameters

events – The ProfileEvents instance returned from getLastProfileEvents().

Returns

An array of ProfileEvent objects. The size of the array is returned by getLastProfileEventCount().

uint32_t (*getProfileThreadCount)(ProfileEvents events)

Returns the number of thread IDs known to the ProfileEvents instance.

Parameters

events – The ProfileEvents instance returned from getLastProfileEvents().

Returns

The number of thread IDs in the array returned by getProfileThreadIds().

uint64_t const *(*getProfileThreadIds)(ProfileEvents events)

Returns an array of thread IDs known to a ProfileEvents instance.

Parameters

events – The ProfileEvents instance returned from getLastProfileEvents().

Returns

An array of thread IDs. The size of the array is returned by getProfileThreadCount(). The thread IDs are comparable with GetCurrentThreadID() on Windows and gettid() on Linux.

void (*releaseLastProfileEvents)(ProfileEvents events)

Destroys a ProfileEvents instance.

The data returned getLastProfileEventsData() and getProfileThreadIds() must not be referenced after this function is called.

Parameters

events – The ProfileEvents instance returned from getLastProfileEvents().

uint64_t (*getMainThreadId)(ProfileEvents events)

Returns the thread ID that triggered the CARB_PROFILE_FRAME() event.

Parameters

events – The ProfileEvents instance returned from getLastProfileEvents().

Returns

The thread ID that last triggered the CARB_PROFILE_FRAME() event. This thread ID is comparable with GetCurrentThreadID() on Windows and gettid() on Linux.

Public Static Functions

static inline carb::InterfaceDesc getInterfaceDesc()

Returns

The carb::InterfaceDesc struct with information about this interface.