Debugging
Types
-
A emitted profiler event.
-
Luna::ProfilerEventData::MemoryAllocate
The memory allocation event data.
-
Luna::ProfilerEventData::MemoryDeallocate
The memory deallocation event data.
-
Luna::ProfilerEventData::SetMemoryName
The set memory name event data.
-
Luna::ProfilerEventData::SetMemoryType
The set memory type event data.
-
Luna::ProfilerEventData::SetMemoryDomain
The set memory domain event data.
Functions
-
void * allocate_profiler_event_data(usize size, usize alignment, void(dtor)(void )=nullptr)
Allocates one temporary buffer that can be used to store event data for the next profiler event.
-
void profiler_event_data_dtor(void *data)
One helper function that calls the destructor of the specified type on the pointer.
-
_Ty * allocate_profiler_event_data()
Allocates one temporary object that can be used to store event data for the next profiler event.
-
void submit_profiler_event(u64 event_id)
Submits one profiler event.
-
usize register_profiler_callback(const Function< on_profiler_event_t > &handler)
Registers one profiler callback function.
-
void unregister_profiler_callback(usize handler_id)
Unregisters one profiler callback function.
-
void memory_profiler_allocate(void *ptr, usize size)
Emits one PROFILER_EVENT_ID_MEMORY_ALLOCATE profiler event.
-
void memory_profiler_deallocate(void *ptr)
Emits one PROFILER_EVENT_ID_MEMORY_DEALLOCATE profiler event.
-
void memory_profiler_set_memory_name(void ptr, const c8 name, usize str_size=USIZE_MAX)
Sets a debug name for the memory block, for example, the name of the resource file this memory block is allocated for. This function emits one PROFILER_EVENT_ID_SET_MEMORY_NAME profiler event.
-
void memory_profiler_set_memory_type(void ptr, const c8 type, usize str_size=USIZE_MAX)
Sets the type of the object this memory block.
-
void memory_profiler_set_memory_domain(void ptr, const c8 domain, usize str_size=USIZE_MAX)
Sets the memory domain.