WIP: Untested more process runtime bootstrapping, some decisions on how grime is setup..

This commit is contained in:
2025-10-13 12:47:16 -04:00
parent 4abd2401f0
commit 0d904fba7c
15 changed files with 257 additions and 203 deletions

View File

@@ -12,26 +12,21 @@ SpallProfiler :: struct {
buffer : spall.Buffer,
}
// @(private)
// Module_Context : ^SpallProfiler
// set_profiler_module_context :: #force_inline proc "contextless" ( ctx : ^SpallProfiler ) {
// Module_Context = ctx
// }
set_profiler_module_context :: #force_inline proc "contextless" ( profiler : ^SpallProfiler ) {
static_memory.spall_profiler = profiler
}
DISABLE_PROFILING :: true
@(deferred_none = profile_end, disabled = DISABLE_PROFILING)
profile :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
// spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
spall._buffer_begin( & static_memory.spall_profiler.ctx, & static_memory.spall_profiler.buffer, name, "", loc )
}
@(disabled = DISABLE_PROFILING)
profile_begin :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
// spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
spall._buffer_begin( & static_memory.spall_profiler.ctx, & static_memory.spall_profiler.buffer, name, "", loc )
}
@(disabled = DISABLE_PROFILING)
profile_end :: #force_inline proc "contextless" () {
// spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
spall._buffer_end( & static_memory.spall_profiler.ctx, & static_memory.spall_profiler.buffer)
}