Attaches to Iprof before opening zones; only one recorder can be attached. Record frames with Iprof.update(true). Stop at a closed-zone boundary, then save and free the captured trace.
Signature
start_capture :: (recorder: *Recorder)
I :: #import "Iprof"(IMPORT_MODE = .CLIENT, MANUAL_MODE = true, USE_GRAPHICS = false);
#import "Extensions/Iprof_Trace";
main :: () {
recorder: Recorder;
start_capture(*recorder);
I.zones[0].name = "work";
I.zones[0].initted = true;
I.zone_begin(0);
I.zone_end();
I.update(true);
stop_capture(*recorder);
assert(save_trace(*recorder.trace, "work.jipt"));
free_trace(*recorder.trace);
}