aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-04-16 08:18:47 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-04-16 14:20:36 +0000
commit0e05124fa8b99e403da71f699481bf4096fa6997 (patch)
treea809ff7ad8be208dc5d4a2ce03103af644a9708d /prog/encodingexec.go
parentf8f619e676a9c568c10ac690b37f8b414cd0d52b (diff)
prog: include number of calls into exec encoding
Prepend total number of calls to the exec encoding. This will allow pkg/ipc to better parse executor response without full parsing of the encoded program.
Diffstat (limited to 'prog/encodingexec.go')
-rw-r--r--prog/encodingexec.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/prog/encodingexec.go b/prog/encodingexec.go
index a51aa54d7..40cfc9592 100644
--- a/prog/encodingexec.go
+++ b/prog/encodingexec.go
@@ -75,6 +75,7 @@ func (p *Prog) SerializeForExec() ([]byte, error) {
buf: make([]byte, 0, 4<<10),
args: make(map[Arg]argInfo),
}
+ w.write(uint64(len(p.Calls)))
for _, c := range p.Calls {
w.csumMap, w.csumUses = calcChecksumsCall(c)
w.serializeCall(c)