diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 11:32:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 12:08:27 -0300 |
| commit | 7f363779cb99b0820cce69c433bcfab87bb3d709 (patch) | |
| tree | 2e2b44d125672ab86ee84e4b101c36f95875a0e6 /src | |
| parent | b63355dd567361642d3b68d106b8e4105bcb5d8c (diff) | |
| download | computeranim-7f363779cb99b0820cce69c433bcfab87bb3d709.tar.gz computeranim-7f363779cb99b0820cce69c433bcfab87bb3d709.zip | |
event: what instrumentation puts in call, ret, line, variable, mem_write
Comments only: call's callee is a name's string id when the backend has
names, a3 its type; ret's aux is the size of the value; a variable's aux
its parameter number; a pc may be 0; a mem_write may hold the first bytes
of a large write.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/trace/event.zig | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/trace/event.zig b/src/trace/event.zig index c24d7ac..4a9f6f7 100644 --- a/src/trace/event.zig +++ b/src/trace/event.zig @@ -24,9 +24,10 @@ pub const Kind = enum(u16) { thread_exit = 8, // Memory. - /// a0=addr a1=len. Payload: the bytes now at addr (len of them). + /// a0=addr a1=len. Payload: the bytes now at addr (len of them, or the + /// first of them: a backend may record a large write in part). mem_write = 16, - /// a0=addr a1=len a2=pc + /// a0=addr a1=len a2=pc (0: not given) mem_read = 17, /// a0=ptr a1=size a2=caller pc. aux: `Alloc`. A realloc that moves is a /// `free` of the old pointer, then this. @@ -39,17 +40,22 @@ pub const Kind = enum(u16) { unmap = 21, // Instrumentation (compiler passes, hooks). - /// a0=callee a1=call site a2=sp + /// a0=callee (the string id of its name, or its address when the + /// backend has no names) a1=call site a2=sp a3=string id of the + /// function's type description, if any call = 32, - /// a0=callee a1=return value + /// a0=callee a1=return value. aux: how many bytes of a1 are the value + /// (0: none, or not known) ret = 33, - /// a0=file string id a1=line a2=column a3=pc + /// a0=file string id a1=line a2=column a3=pc (0: not given) line = 34, /// a0=pc (a coverage edge) edge = 35, /// aux=operand bytes a0=pc a1=lhs a2=rhs cmp = 36, - /// A named variable comes alive: a0=addr a1=size a2=name string id a3=type string id + /// A named variable comes alive: a0=addr a1=size a2=name string id + /// a3=type string id (a description: src/instr/types.zig). aux: N for a + /// function's Nth parameter. variable = 37, // Kernel. |
