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 the previous markFrameEnd() call).
- 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 andgettid()
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 called markFrameEnd() event.
- Parameters
events – The ProfileEvents instance returned from getLastProfileEvents().
- Returns
The thread ID that last called markFrameEnd(). This thread ID is comparable with
GetCurrentThreadID()
on Windows andgettid()
on Linux.
-
void (*
markFrameEnd
)()¶ Marks the end of a frame’s profile events.
After this call, the previous frame’s profile events are available via getLastProfileEvents().
Public Static Functions
-
static inline carb::InterfaceDesc
getInterfaceDesc
()¶ Returns information about this interface. Auto-generated by CARB_PLUGIN_INTERFACE(). *
- Returns
The carb::InterfaceDesc struct with information about this interface.
-
ProfileEvents (*