...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package main
16
17 import (
18 "internal/trace"
19 "internal/trace/event/go122"
20 testgen "internal/trace/internal/testgen/go122"
21 )
22
23 func main() {
24 testgen.Main(gen)
25 }
26
27 func gen(t *testgen.Trace) {
28 t.ExpectFailure(".*expected a proc but didn't have one.*")
29
30 g := t.Generation(1)
31
32
33
34
35
36
37
38
39
40 b0 := g.Batch(trace.ThreadID(0), 0)
41 b0.Event("GoCreateSyscall", trace.GoID(4))
42 b0.Event("ProcStatus", trace.ProcID(0), go122.ProcIdle)
43 b0.Event("ProcStart", trace.ProcID(0), testgen.Seq(1))
44 b0.Event("GoSyscallEndBlocked")
45 b0.Event("GoStart", trace.GoID(4), testgen.Seq(1))
46 b0.Event("GoSyscallBegin", testgen.Seq(2), testgen.NoStack)
47 b0.Event("GoDestroySyscall")
48 b0.Event("GoCreateSyscall", trace.GoID(4))
49 b0.Event("GoSyscallEnd")
50 b0.Event("GoSyscallBegin", testgen.Seq(3), testgen.NoStack)
51 b0.Event("GoDestroySyscall")
52 }
53
View as plain text