2024-03-10 23:05:18 -07:00
|
|
|
package sectr
|
|
|
|
|
|
|
|
import "base:runtime"
|
|
|
|
import "core:prof/spall"
|
|
|
|
|
|
|
|
SpallProfiler :: struct {
|
|
|
|
ctx : spall.Context,
|
|
|
|
buffer : spall.Buffer,
|
|
|
|
}
|
|
|
|
|
|
|
|
@(deferred_none=profile_end)
|
|
|
|
profile :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
|
|
|
spall._buffer_begin( & Memory_App.profiler.ctx, & Memory_App.profiler.buffer, name, "", loc )
|
|
|
|
}
|
|
|
|
|
|
|
|
profile_begin :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
|
|
|
spall._buffer_begin( & Memory_App.profiler.ctx, & Memory_App.profiler.buffer, name, "", loc )
|
|
|
|
}
|
|
|
|
|
2024-03-19 05:36:58 -07:00
|
|
|
profile_end :: #force_inline proc "contextless" () {
|
2024-03-10 23:05:18 -07:00
|
|
|
spall._buffer_end( & Memory_App.profiler.ctx, & Memory_App.profiler.buffer)
|
|
|
|
}
|