@0xd1504174f3048b95; # unique file ID, generated by `capnp id`

struct Trace {
    id         @0  :UInt16;
    parentid   @1  :UInt16 = 0;
    exitnum    @2  :UInt16 = 0;
    stitched   @3  :Bool = false;
    startfunc  @4  :UInt16;
    startpc    @5  :Int16;
    stopfunc   @6  :UInt16;
    stoppc     @7  :Int16;
    link       @8  :Text;
    funcs      @9  :List(UInt16);
    bytecodee  @10 :List(Int16);
    starttime  @11 :Float64;
    endtime    @12 :Float64;
    abort      @13 :Bool = false;
    aborterror @14 :UInt16 = 0;
    abortinfo  @15 :Int16 = 0;
}

struct Function {
    id    @0 :UInt16;
    name  @1 :Text;
    chunk @2 :Text;
    line  @3 :Int32 = -1;
    cfunc @4 :Bool = false;
    ffid  @5 :UInt8 = 0;
}

struct JITLog {
  functions    @0 :List(Function);
  traces       @1 :List(Trace);
  abortreasons @2 :List(Text);
  bcnames      @3 :List(Text);
}