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