feat(tvix/eval): give generators human-readable names

This adds static strings to generator frames that describe the
generator in a human-readable fashion, which are then logged in
observers.

This makes runtime traces very precise, explaining exactly what is
being requested from where.

Change-Id: I695659a6bd0b7b0bdee75bc8049651f62b150e0c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8206
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
Vincent Ambo 2023-03-04 00:52:37 +03:00 committed by tazjin
parent dfd0066de5
commit 1e37f8b52e
5 changed files with 84 additions and 55 deletions

View file

@ -48,7 +48,7 @@ macro_rules! cmp_op {
let gen_span = $frame.current_light_span();
$vm.push_call_frame($span, $frame);
$vm.enqueue_generator(gen_span, |co| compare(a, b, co));
$vm.enqueue_generator("compare", gen_span, |co| compare(a, b, co));
return Ok(false);
}};