spall instrumentation

This commit is contained in:
Laytan Laats
2024-02-05 16:54:22 +01:00
committed by Laytan
parent 1ebb7f8e9d
commit ca6300c860
8 changed files with 187 additions and 11 deletions
+13
View File
@@ -22,5 +22,18 @@ main :: proc() {
foo()
}
}
// Automatic profiling of every procedure:
@(instrumentation_enter)
spall_enter :: proc "contextless" (proc_address, call_site_return_address: rawptr, loc: runtime.Source_Code_Location) {
spall._buffer_begin(&spall_ctx, &spall_buffer, "", "", loc)
}
@(instrumentation_exit)
spall_exit :: proc "contextless" (proc_address, call_site_return_address: rawptr, loc: runtime.Source_Code_Location) {
spall._buffer_end(&spall_ctx, &spall_buffer)
}
*/
package spall