1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
// automatically generated by stateify.
// +build 386 amd64
package cpuid
import (
"gvisor.dev/gvisor/pkg/state"
)
func (c *Cache) StateTypeName() string {
return "pkg/cpuid.Cache"
}
func (c *Cache) StateFields() []string {
return []string{
"Level",
"Type",
"FullyAssociative",
"Partitions",
"Ways",
"Sets",
"InvalidateHierarchical",
"Inclusive",
"DirectMapped",
}
}
func (c *Cache) beforeSave() {}
func (c *Cache) StateSave(stateSinkObject state.Sink) {
c.beforeSave()
stateSinkObject.Save(0, &c.Level)
stateSinkObject.Save(1, &c.Type)
stateSinkObject.Save(2, &c.FullyAssociative)
stateSinkObject.Save(3, &c.Partitions)
stateSinkObject.Save(4, &c.Ways)
stateSinkObject.Save(5, &c.Sets)
stateSinkObject.Save(6, &c.InvalidateHierarchical)
stateSinkObject.Save(7, &c.Inclusive)
stateSinkObject.Save(8, &c.DirectMapped)
}
func (c *Cache) afterLoad() {}
func (c *Cache) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &c.Level)
stateSourceObject.Load(1, &c.Type)
stateSourceObject.Load(2, &c.FullyAssociative)
stateSourceObject.Load(3, &c.Partitions)
stateSourceObject.Load(4, &c.Ways)
stateSourceObject.Load(5, &c.Sets)
stateSourceObject.Load(6, &c.InvalidateHierarchical)
stateSourceObject.Load(7, &c.Inclusive)
stateSourceObject.Load(8, &c.DirectMapped)
}
func (f *FeatureSet) StateTypeName() string {
return "pkg/cpuid.FeatureSet"
}
func (f *FeatureSet) StateFields() []string {
return []string{
"Set",
"VendorID",
"ExtendedFamily",
"ExtendedModel",
"ProcessorType",
"Family",
"Model",
"SteppingID",
"Caches",
"CacheLine",
}
}
func (f *FeatureSet) beforeSave() {}
func (f *FeatureSet) StateSave(stateSinkObject state.Sink) {
f.beforeSave()
stateSinkObject.Save(0, &f.Set)
stateSinkObject.Save(1, &f.VendorID)
stateSinkObject.Save(2, &f.ExtendedFamily)
stateSinkObject.Save(3, &f.ExtendedModel)
stateSinkObject.Save(4, &f.ProcessorType)
stateSinkObject.Save(5, &f.Family)
stateSinkObject.Save(6, &f.Model)
stateSinkObject.Save(7, &f.SteppingID)
stateSinkObject.Save(8, &f.Caches)
stateSinkObject.Save(9, &f.CacheLine)
}
func (f *FeatureSet) afterLoad() {}
func (f *FeatureSet) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &f.Set)
stateSourceObject.Load(1, &f.VendorID)
stateSourceObject.Load(2, &f.ExtendedFamily)
stateSourceObject.Load(3, &f.ExtendedModel)
stateSourceObject.Load(4, &f.ProcessorType)
stateSourceObject.Load(5, &f.Family)
stateSourceObject.Load(6, &f.Model)
stateSourceObject.Load(7, &f.SteppingID)
stateSourceObject.Load(8, &f.Caches)
stateSourceObject.Load(9, &f.CacheLine)
}
func init() {
state.Register((*Cache)(nil))
state.Register((*FeatureSet)(nil))
}
|