messing around with testing using keyword in proc args (with new debug support)

This commit is contained in:
2025-07-19 00:07:36 -04:00
parent fe8e84f9bd
commit 3769413a50
8 changed files with 31 additions and 32 deletions

View File

@ -12,30 +12,26 @@ SpallProfiler :: struct {
buffer : spall.Buffer,
}
// The rest is a snippet to implement in the target codebase.
when false
{
@(private)
Module_Context : ^SpallProfiler
@(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" ( ctx : ^SpallProfiler ) {
Module_Context = ctx
}
DISABLE_PROFILING :: true
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 )
}
@(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 )
}
@(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 )
}
@(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 )
}
@(disabled = DISABLE_PROFILING)
profile_end :: #force_inline proc "contextless" () {
spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
}
}
@(disabled = DISABLE_PROFILING)
profile_end :: #force_inline proc "contextless" () {
spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
}