...
1
2
3
4
5
6
7 package main
8
9 import (
10 "internal/trace"
11 "internal/trace/event/go122"
12 testgen "internal/trace/internal/testgen/go122"
13 )
14
15 func main() {
16 testgen.Main(gen)
17 }
18
19 func gen(t *testgen.Trace) {
20 g := t.Generation(1)
21
22
23 b0 := g.Batch(trace.ThreadID(0), 0)
24 b0.Event("ProcStatus", trace.ProcID(1), go122.ProcIdle)
25 b0.Event("ProcStatus", trace.ProcID(0), go122.ProcRunning)
26 b0.Event("GoStatus", trace.GoID(1), trace.ThreadID(0), go122.GoRunning)
27 b0.Event("GoSyscallBegin", testgen.Seq(1), testgen.NoStack)
28 b0.Event("ProcStart", trace.ProcID(1), testgen.Seq(1))
29 b0.Event("GoSyscallEndBlocked")
30
31
32 b1 := g.Batch(trace.ThreadID(1), 0)
33 b1.Event("ProcStatus", trace.ProcID(2), go122.ProcRunning)
34 b1.Event("GoStatus", trace.GoID(2), trace.ThreadID(1), go122.GoRunning)
35 b1.Event("ProcSteal", trace.ProcID(0), testgen.Seq(2), trace.ThreadID(0))
36 }
37
View as plain text