summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/mm/mm_state_autogen.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/mm/mm_state_autogen.go')
-rw-r--r--pkg/sentry/mm/mm_state_autogen.go802
1 files changed, 555 insertions, 247 deletions
diff --git a/pkg/sentry/mm/mm_state_autogen.go b/pkg/sentry/mm/mm_state_autogen.go
index fde35bcd8..2f81a8240 100644
--- a/pkg/sentry/mm/mm_state_autogen.go
+++ b/pkg/sentry/mm/mm_state_autogen.go
@@ -6,399 +6,707 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
+func (x *aioManager) StateTypeName() string {
+ return "pkg/sentry/mm.aioManager"
+}
+
+func (x *aioManager) StateFields() []string {
+ return []string{
+ "contexts",
+ }
+}
+
func (x *aioManager) beforeSave() {}
-func (x *aioManager) save(m state.Map) {
+
+func (x *aioManager) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("contexts", &x.contexts)
+ m.Save(0, &x.contexts)
}
func (x *aioManager) afterLoad() {}
-func (x *aioManager) load(m state.Map) {
- m.Load("contexts", &x.contexts)
+
+func (x *aioManager) StateLoad(m state.Source) {
+ m.Load(0, &x.contexts)
+}
+
+func (x *ioResult) StateTypeName() string {
+ return "pkg/sentry/mm.ioResult"
+}
+
+func (x *ioResult) StateFields() []string {
+ return []string{
+ "data",
+ "ioEntry",
+ }
}
func (x *ioResult) beforeSave() {}
-func (x *ioResult) save(m state.Map) {
+
+func (x *ioResult) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("data", &x.data)
- m.Save("ioEntry", &x.ioEntry)
+ m.Save(0, &x.data)
+ m.Save(1, &x.ioEntry)
}
func (x *ioResult) afterLoad() {}
-func (x *ioResult) load(m state.Map) {
- m.Load("data", &x.data)
- m.Load("ioEntry", &x.ioEntry)
+
+func (x *ioResult) StateLoad(m state.Source) {
+ m.Load(0, &x.data)
+ m.Load(1, &x.ioEntry)
+}
+
+func (x *AIOContext) StateTypeName() string {
+ return "pkg/sentry/mm.AIOContext"
+}
+
+func (x *AIOContext) StateFields() []string {
+ return []string{
+ "results",
+ "maxOutstanding",
+ "outstanding",
+ }
}
func (x *AIOContext) beforeSave() {}
-func (x *AIOContext) save(m state.Map) {
+
+func (x *AIOContext) StateSave(m state.Sink) {
x.beforeSave()
if !state.IsZeroValue(&x.dead) {
- m.Failf("dead is %#v, expected zero", &x.dead)
+ state.Failf("dead is %#v, expected zero", &x.dead)
}
- m.Save("results", &x.results)
- m.Save("maxOutstanding", &x.maxOutstanding)
- m.Save("outstanding", &x.outstanding)
+ m.Save(0, &x.results)
+ m.Save(1, &x.maxOutstanding)
+ m.Save(2, &x.outstanding)
}
-func (x *AIOContext) load(m state.Map) {
- m.Load("results", &x.results)
- m.Load("maxOutstanding", &x.maxOutstanding)
- m.Load("outstanding", &x.outstanding)
+func (x *AIOContext) StateLoad(m state.Source) {
+ m.Load(0, &x.results)
+ m.Load(1, &x.maxOutstanding)
+ m.Load(2, &x.outstanding)
m.AfterLoad(x.afterLoad)
}
+func (x *aioMappable) StateTypeName() string {
+ return "pkg/sentry/mm.aioMappable"
+}
+
+func (x *aioMappable) StateFields() []string {
+ return []string{
+ "AtomicRefCount",
+ "mfp",
+ "fr",
+ }
+}
+
func (x *aioMappable) beforeSave() {}
-func (x *aioMappable) save(m state.Map) {
+
+func (x *aioMappable) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("AtomicRefCount", &x.AtomicRefCount)
- m.Save("mfp", &x.mfp)
- m.Save("fr", &x.fr)
+ m.Save(0, &x.AtomicRefCount)
+ m.Save(1, &x.mfp)
+ m.Save(2, &x.fr)
}
func (x *aioMappable) afterLoad() {}
-func (x *aioMappable) load(m state.Map) {
- m.Load("AtomicRefCount", &x.AtomicRefCount)
- m.Load("mfp", &x.mfp)
- m.Load("fr", &x.fr)
+
+func (x *aioMappable) StateLoad(m state.Source) {
+ m.Load(0, &x.AtomicRefCount)
+ m.Load(1, &x.mfp)
+ m.Load(2, &x.fr)
+}
+
+func (x *fileRefcountSet) StateTypeName() string {
+ return "pkg/sentry/mm.fileRefcountSet"
+}
+
+func (x *fileRefcountSet) StateFields() []string {
+ return []string{
+ "root",
+ }
}
func (x *fileRefcountSet) beforeSave() {}
-func (x *fileRefcountSet) save(m state.Map) {
+
+func (x *fileRefcountSet) StateSave(m state.Sink) {
x.beforeSave()
var root *fileRefcountSegmentDataSlices = x.saveRoot()
- m.SaveValue("root", root)
+ m.SaveValue(0, root)
}
func (x *fileRefcountSet) afterLoad() {}
-func (x *fileRefcountSet) load(m state.Map) {
- m.LoadValue("root", new(*fileRefcountSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*fileRefcountSegmentDataSlices)) })
+
+func (x *fileRefcountSet) StateLoad(m state.Source) {
+ m.LoadValue(0, new(*fileRefcountSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*fileRefcountSegmentDataSlices)) })
+}
+
+func (x *fileRefcountnode) StateTypeName() string {
+ return "pkg/sentry/mm.fileRefcountnode"
+}
+
+func (x *fileRefcountnode) StateFields() []string {
+ return []string{
+ "nrSegments",
+ "parent",
+ "parentIndex",
+ "hasChildren",
+ "maxGap",
+ "keys",
+ "values",
+ "children",
+ }
}
func (x *fileRefcountnode) beforeSave() {}
-func (x *fileRefcountnode) save(m state.Map) {
+
+func (x *fileRefcountnode) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("nrSegments", &x.nrSegments)
- m.Save("parent", &x.parent)
- m.Save("parentIndex", &x.parentIndex)
- m.Save("hasChildren", &x.hasChildren)
- m.Save("maxGap", &x.maxGap)
- m.Save("keys", &x.keys)
- m.Save("values", &x.values)
- m.Save("children", &x.children)
+ m.Save(0, &x.nrSegments)
+ m.Save(1, &x.parent)
+ m.Save(2, &x.parentIndex)
+ m.Save(3, &x.hasChildren)
+ m.Save(4, &x.maxGap)
+ m.Save(5, &x.keys)
+ m.Save(6, &x.values)
+ m.Save(7, &x.children)
}
func (x *fileRefcountnode) afterLoad() {}
-func (x *fileRefcountnode) load(m state.Map) {
- m.Load("nrSegments", &x.nrSegments)
- m.Load("parent", &x.parent)
- m.Load("parentIndex", &x.parentIndex)
- m.Load("hasChildren", &x.hasChildren)
- m.Load("maxGap", &x.maxGap)
- m.Load("keys", &x.keys)
- m.Load("values", &x.values)
- m.Load("children", &x.children)
+
+func (x *fileRefcountnode) StateLoad(m state.Source) {
+ m.Load(0, &x.nrSegments)
+ m.Load(1, &x.parent)
+ m.Load(2, &x.parentIndex)
+ m.Load(3, &x.hasChildren)
+ m.Load(4, &x.maxGap)
+ m.Load(5, &x.keys)
+ m.Load(6, &x.values)
+ m.Load(7, &x.children)
+}
+
+func (x *fileRefcountSegmentDataSlices) StateTypeName() string {
+ return "pkg/sentry/mm.fileRefcountSegmentDataSlices"
+}
+
+func (x *fileRefcountSegmentDataSlices) StateFields() []string {
+ return []string{
+ "Start",
+ "End",
+ "Values",
+ }
}
func (x *fileRefcountSegmentDataSlices) beforeSave() {}
-func (x *fileRefcountSegmentDataSlices) save(m state.Map) {
+
+func (x *fileRefcountSegmentDataSlices) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("Start", &x.Start)
- m.Save("End", &x.End)
- m.Save("Values", &x.Values)
+ m.Save(0, &x.Start)
+ m.Save(1, &x.End)
+ m.Save(2, &x.Values)
}
func (x *fileRefcountSegmentDataSlices) afterLoad() {}
-func (x *fileRefcountSegmentDataSlices) load(m state.Map) {
- m.Load("Start", &x.Start)
- m.Load("End", &x.End)
- m.Load("Values", &x.Values)
+
+func (x *fileRefcountSegmentDataSlices) StateLoad(m state.Source) {
+ m.Load(0, &x.Start)
+ m.Load(1, &x.End)
+ m.Load(2, &x.Values)
+}
+
+func (x *ioList) StateTypeName() string {
+ return "pkg/sentry/mm.ioList"
+}
+
+func (x *ioList) StateFields() []string {
+ return []string{
+ "head",
+ "tail",
+ }
}
func (x *ioList) beforeSave() {}
-func (x *ioList) save(m state.Map) {
+
+func (x *ioList) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("head", &x.head)
- m.Save("tail", &x.tail)
+ m.Save(0, &x.head)
+ m.Save(1, &x.tail)
}
func (x *ioList) afterLoad() {}
-func (x *ioList) load(m state.Map) {
- m.Load("head", &x.head)
- m.Load("tail", &x.tail)
+
+func (x *ioList) StateLoad(m state.Source) {
+ m.Load(0, &x.head)
+ m.Load(1, &x.tail)
+}
+
+func (x *ioEntry) StateTypeName() string {
+ return "pkg/sentry/mm.ioEntry"
+}
+
+func (x *ioEntry) StateFields() []string {
+ return []string{
+ "next",
+ "prev",
+ }
}
func (x *ioEntry) beforeSave() {}
-func (x *ioEntry) save(m state.Map) {
+
+func (x *ioEntry) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("next", &x.next)
- m.Save("prev", &x.prev)
+ m.Save(0, &x.next)
+ m.Save(1, &x.prev)
}
func (x *ioEntry) afterLoad() {}
-func (x *ioEntry) load(m state.Map) {
- m.Load("next", &x.next)
- m.Load("prev", &x.prev)
+
+func (x *ioEntry) StateLoad(m state.Source) {
+ m.Load(0, &x.next)
+ m.Load(1, &x.prev)
+}
+
+func (x *MemoryManager) StateTypeName() string {
+ return "pkg/sentry/mm.MemoryManager"
+}
+
+func (x *MemoryManager) StateFields() []string {
+ return []string{
+ "p",
+ "mfp",
+ "layout",
+ "privateRefs",
+ "users",
+ "vmas",
+ "brk",
+ "usageAS",
+ "lockedAS",
+ "dataAS",
+ "defMLockMode",
+ "pmas",
+ "curRSS",
+ "maxRSS",
+ "argv",
+ "envv",
+ "auxv",
+ "executable",
+ "dumpability",
+ "aioManager",
+ "sleepForActivation",
+ "vdsoSigReturnAddr",
+ }
}
-func (x *MemoryManager) save(m state.Map) {
+func (x *MemoryManager) StateSave(m state.Sink) {
x.beforeSave()
if !state.IsZeroValue(&x.active) {
- m.Failf("active is %#v, expected zero", &x.active)
+ state.Failf("active is %#v, expected zero", &x.active)
}
if !state.IsZeroValue(&x.captureInvalidations) {
- m.Failf("captureInvalidations is %#v, expected zero", &x.captureInvalidations)
+ state.Failf("captureInvalidations is %#v, expected zero", &x.captureInvalidations)
}
- m.Save("p", &x.p)
- m.Save("mfp", &x.mfp)
- m.Save("layout", &x.layout)
- m.Save("privateRefs", &x.privateRefs)
- m.Save("users", &x.users)
- m.Save("vmas", &x.vmas)
- m.Save("brk", &x.brk)
- m.Save("usageAS", &x.usageAS)
- m.Save("lockedAS", &x.lockedAS)
- m.Save("dataAS", &x.dataAS)
- m.Save("defMLockMode", &x.defMLockMode)
- m.Save("pmas", &x.pmas)
- m.Save("curRSS", &x.curRSS)
- m.Save("maxRSS", &x.maxRSS)
- m.Save("argv", &x.argv)
- m.Save("envv", &x.envv)
- m.Save("auxv", &x.auxv)
- m.Save("executable", &x.executable)
- m.Save("dumpability", &x.dumpability)
- m.Save("aioManager", &x.aioManager)
- m.Save("sleepForActivation", &x.sleepForActivation)
- m.Save("vdsoSigReturnAddr", &x.vdsoSigReturnAddr)
-}
-
-func (x *MemoryManager) load(m state.Map) {
- m.Load("p", &x.p)
- m.Load("mfp", &x.mfp)
- m.Load("layout", &x.layout)
- m.Load("privateRefs", &x.privateRefs)
- m.Load("users", &x.users)
- m.Load("vmas", &x.vmas)
- m.Load("brk", &x.brk)
- m.Load("usageAS", &x.usageAS)
- m.Load("lockedAS", &x.lockedAS)
- m.Load("dataAS", &x.dataAS)
- m.Load("defMLockMode", &x.defMLockMode)
- m.Load("pmas", &x.pmas)
- m.Load("curRSS", &x.curRSS)
- m.Load("maxRSS", &x.maxRSS)
- m.Load("argv", &x.argv)
- m.Load("envv", &x.envv)
- m.Load("auxv", &x.auxv)
- m.Load("executable", &x.executable)
- m.Load("dumpability", &x.dumpability)
- m.Load("aioManager", &x.aioManager)
- m.Load("sleepForActivation", &x.sleepForActivation)
- m.Load("vdsoSigReturnAddr", &x.vdsoSigReturnAddr)
+ m.Save(0, &x.p)
+ m.Save(1, &x.mfp)
+ m.Save(2, &x.layout)
+ m.Save(3, &x.privateRefs)
+ m.Save(4, &x.users)
+ m.Save(5, &x.vmas)
+ m.Save(6, &x.brk)
+ m.Save(7, &x.usageAS)
+ m.Save(8, &x.lockedAS)
+ m.Save(9, &x.dataAS)
+ m.Save(10, &x.defMLockMode)
+ m.Save(11, &x.pmas)
+ m.Save(12, &x.curRSS)
+ m.Save(13, &x.maxRSS)
+ m.Save(14, &x.argv)
+ m.Save(15, &x.envv)
+ m.Save(16, &x.auxv)
+ m.Save(17, &x.executable)
+ m.Save(18, &x.dumpability)
+ m.Save(19, &x.aioManager)
+ m.Save(20, &x.sleepForActivation)
+ m.Save(21, &x.vdsoSigReturnAddr)
+}
+
+func (x *MemoryManager) StateLoad(m state.Source) {
+ m.Load(0, &x.p)
+ m.Load(1, &x.mfp)
+ m.Load(2, &x.layout)
+ m.Load(3, &x.privateRefs)
+ m.Load(4, &x.users)
+ m.Load(5, &x.vmas)
+ m.Load(6, &x.brk)
+ m.Load(7, &x.usageAS)
+ m.Load(8, &x.lockedAS)
+ m.Load(9, &x.dataAS)
+ m.Load(10, &x.defMLockMode)
+ m.Load(11, &x.pmas)
+ m.Load(12, &x.curRSS)
+ m.Load(13, &x.maxRSS)
+ m.Load(14, &x.argv)
+ m.Load(15, &x.envv)
+ m.Load(16, &x.auxv)
+ m.Load(17, &x.executable)
+ m.Load(18, &x.dumpability)
+ m.Load(19, &x.aioManager)
+ m.Load(20, &x.sleepForActivation)
+ m.Load(21, &x.vdsoSigReturnAddr)
m.AfterLoad(x.afterLoad)
}
+func (x *vma) StateTypeName() string {
+ return "pkg/sentry/mm.vma"
+}
+
+func (x *vma) StateFields() []string {
+ return []string{
+ "mappable",
+ "off",
+ "realPerms",
+ "dontfork",
+ "mlockMode",
+ "numaPolicy",
+ "numaNodemask",
+ "id",
+ "hint",
+ }
+}
+
func (x *vma) beforeSave() {}
-func (x *vma) save(m state.Map) {
+
+func (x *vma) StateSave(m state.Sink) {
x.beforeSave()
var realPerms int = x.saveRealPerms()
- m.SaveValue("realPerms", realPerms)
- m.Save("mappable", &x.mappable)
- m.Save("off", &x.off)
- m.Save("dontfork", &x.dontfork)
- m.Save("mlockMode", &x.mlockMode)
- m.Save("numaPolicy", &x.numaPolicy)
- m.Save("numaNodemask", &x.numaNodemask)
- m.Save("id", &x.id)
- m.Save("hint", &x.hint)
+ m.SaveValue(2, realPerms)
+ m.Save(0, &x.mappable)
+ m.Save(1, &x.off)
+ m.Save(3, &x.dontfork)
+ m.Save(4, &x.mlockMode)
+ m.Save(5, &x.numaPolicy)
+ m.Save(6, &x.numaNodemask)
+ m.Save(7, &x.id)
+ m.Save(8, &x.hint)
}
func (x *vma) afterLoad() {}
-func (x *vma) load(m state.Map) {
- m.Load("mappable", &x.mappable)
- m.Load("off", &x.off)
- m.Load("dontfork", &x.dontfork)
- m.Load("mlockMode", &x.mlockMode)
- m.Load("numaPolicy", &x.numaPolicy)
- m.Load("numaNodemask", &x.numaNodemask)
- m.Load("id", &x.id)
- m.Load("hint", &x.hint)
- m.LoadValue("realPerms", new(int), func(y interface{}) { x.loadRealPerms(y.(int)) })
+
+func (x *vma) StateLoad(m state.Source) {
+ m.Load(0, &x.mappable)
+ m.Load(1, &x.off)
+ m.Load(3, &x.dontfork)
+ m.Load(4, &x.mlockMode)
+ m.Load(5, &x.numaPolicy)
+ m.Load(6, &x.numaNodemask)
+ m.Load(7, &x.id)
+ m.Load(8, &x.hint)
+ m.LoadValue(2, new(int), func(y interface{}) { x.loadRealPerms(y.(int)) })
+}
+
+func (x *pma) StateTypeName() string {
+ return "pkg/sentry/mm.pma"
+}
+
+func (x *pma) StateFields() []string {
+ return []string{
+ "off",
+ "translatePerms",
+ "effectivePerms",
+ "maxPerms",
+ "needCOW",
+ "private",
+ }
}
func (x *pma) beforeSave() {}
-func (x *pma) save(m state.Map) {
+
+func (x *pma) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("off", &x.off)
- m.Save("translatePerms", &x.translatePerms)
- m.Save("effectivePerms", &x.effectivePerms)
- m.Save("maxPerms", &x.maxPerms)
- m.Save("needCOW", &x.needCOW)
- m.Save("private", &x.private)
+ m.Save(0, &x.off)
+ m.Save(1, &x.translatePerms)
+ m.Save(2, &x.effectivePerms)
+ m.Save(3, &x.maxPerms)
+ m.Save(4, &x.needCOW)
+ m.Save(5, &x.private)
}
func (x *pma) afterLoad() {}
-func (x *pma) load(m state.Map) {
- m.Load("off", &x.off)
- m.Load("translatePerms", &x.translatePerms)
- m.Load("effectivePerms", &x.effectivePerms)
- m.Load("maxPerms", &x.maxPerms)
- m.Load("needCOW", &x.needCOW)
- m.Load("private", &x.private)
+
+func (x *pma) StateLoad(m state.Source) {
+ m.Load(0, &x.off)
+ m.Load(1, &x.translatePerms)
+ m.Load(2, &x.effectivePerms)
+ m.Load(3, &x.maxPerms)
+ m.Load(4, &x.needCOW)
+ m.Load(5, &x.private)
+}
+
+func (x *privateRefs) StateTypeName() string {
+ return "pkg/sentry/mm.privateRefs"
+}
+
+func (x *privateRefs) StateFields() []string {
+ return []string{
+ "refs",
+ }
}
func (x *privateRefs) beforeSave() {}
-func (x *privateRefs) save(m state.Map) {
+
+func (x *privateRefs) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("refs", &x.refs)
+ m.Save(0, &x.refs)
}
func (x *privateRefs) afterLoad() {}
-func (x *privateRefs) load(m state.Map) {
- m.Load("refs", &x.refs)
+
+func (x *privateRefs) StateLoad(m state.Source) {
+ m.Load(0, &x.refs)
+}
+
+func (x *pmaSet) StateTypeName() string {
+ return "pkg/sentry/mm.pmaSet"
+}
+
+func (x *pmaSet) StateFields() []string {
+ return []string{
+ "root",
+ }
}
func (x *pmaSet) beforeSave() {}
-func (x *pmaSet) save(m state.Map) {
+
+func (x *pmaSet) StateSave(m state.Sink) {
x.beforeSave()
var root *pmaSegmentDataSlices = x.saveRoot()
- m.SaveValue("root", root)
+ m.SaveValue(0, root)
}
func (x *pmaSet) afterLoad() {}
-func (x *pmaSet) load(m state.Map) {
- m.LoadValue("root", new(*pmaSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*pmaSegmentDataSlices)) })
+
+func (x *pmaSet) StateLoad(m state.Source) {
+ m.LoadValue(0, new(*pmaSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*pmaSegmentDataSlices)) })
+}
+
+func (x *pmanode) StateTypeName() string {
+ return "pkg/sentry/mm.pmanode"
+}
+
+func (x *pmanode) StateFields() []string {
+ return []string{
+ "nrSegments",
+ "parent",
+ "parentIndex",
+ "hasChildren",
+ "maxGap",
+ "keys",
+ "values",
+ "children",
+ }
}
func (x *pmanode) beforeSave() {}
-func (x *pmanode) save(m state.Map) {
+
+func (x *pmanode) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("nrSegments", &x.nrSegments)
- m.Save("parent", &x.parent)
- m.Save("parentIndex", &x.parentIndex)
- m.Save("hasChildren", &x.hasChildren)
- m.Save("maxGap", &x.maxGap)
- m.Save("keys", &x.keys)
- m.Save("values", &x.values)
- m.Save("children", &x.children)
+ m.Save(0, &x.nrSegments)
+ m.Save(1, &x.parent)
+ m.Save(2, &x.parentIndex)
+ m.Save(3, &x.hasChildren)
+ m.Save(4, &x.maxGap)
+ m.Save(5, &x.keys)
+ m.Save(6, &x.values)
+ m.Save(7, &x.children)
}
func (x *pmanode) afterLoad() {}
-func (x *pmanode) load(m state.Map) {
- m.Load("nrSegments", &x.nrSegments)
- m.Load("parent", &x.parent)
- m.Load("parentIndex", &x.parentIndex)
- m.Load("hasChildren", &x.hasChildren)
- m.Load("maxGap", &x.maxGap)
- m.Load("keys", &x.keys)
- m.Load("values", &x.values)
- m.Load("children", &x.children)
+
+func (x *pmanode) StateLoad(m state.Source) {
+ m.Load(0, &x.nrSegments)
+ m.Load(1, &x.parent)
+ m.Load(2, &x.parentIndex)
+ m.Load(3, &x.hasChildren)
+ m.Load(4, &x.maxGap)
+ m.Load(5, &x.keys)
+ m.Load(6, &x.values)
+ m.Load(7, &x.children)
+}
+
+func (x *pmaSegmentDataSlices) StateTypeName() string {
+ return "pkg/sentry/mm.pmaSegmentDataSlices"
+}
+
+func (x *pmaSegmentDataSlices) StateFields() []string {
+ return []string{
+ "Start",
+ "End",
+ "Values",
+ }
}
func (x *pmaSegmentDataSlices) beforeSave() {}
-func (x *pmaSegmentDataSlices) save(m state.Map) {
+
+func (x *pmaSegmentDataSlices) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("Start", &x.Start)
- m.Save("End", &x.End)
- m.Save("Values", &x.Values)
+ m.Save(0, &x.Start)
+ m.Save(1, &x.End)
+ m.Save(2, &x.Values)
}
func (x *pmaSegmentDataSlices) afterLoad() {}
-func (x *pmaSegmentDataSlices) load(m state.Map) {
- m.Load("Start", &x.Start)
- m.Load("End", &x.End)
- m.Load("Values", &x.Values)
+
+func (x *pmaSegmentDataSlices) StateLoad(m state.Source) {
+ m.Load(0, &x.Start)
+ m.Load(1, &x.End)
+ m.Load(2, &x.Values)
+}
+
+func (x *SpecialMappable) StateTypeName() string {
+ return "pkg/sentry/mm.SpecialMappable"
+}
+
+func (x *SpecialMappable) StateFields() []string {
+ return []string{
+ "AtomicRefCount",
+ "mfp",
+ "fr",
+ "name",
+ }
}
func (x *SpecialMappable) beforeSave() {}
-func (x *SpecialMappable) save(m state.Map) {
+
+func (x *SpecialMappable) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("AtomicRefCount", &x.AtomicRefCount)
- m.Save("mfp", &x.mfp)
- m.Save("fr", &x.fr)
- m.Save("name", &x.name)
+ m.Save(0, &x.AtomicRefCount)
+ m.Save(1, &x.mfp)
+ m.Save(2, &x.fr)
+ m.Save(3, &x.name)
}
func (x *SpecialMappable) afterLoad() {}
-func (x *SpecialMappable) load(m state.Map) {
- m.Load("AtomicRefCount", &x.AtomicRefCount)
- m.Load("mfp", &x.mfp)
- m.Load("fr", &x.fr)
- m.Load("name", &x.name)
+
+func (x *SpecialMappable) StateLoad(m state.Source) {
+ m.Load(0, &x.AtomicRefCount)
+ m.Load(1, &x.mfp)
+ m.Load(2, &x.fr)
+ m.Load(3, &x.name)
+}
+
+func (x *vmaSet) StateTypeName() string {
+ return "pkg/sentry/mm.vmaSet"
+}
+
+func (x *vmaSet) StateFields() []string {
+ return []string{
+ "root",
+ }
}
func (x *vmaSet) beforeSave() {}
-func (x *vmaSet) save(m state.Map) {
+
+func (x *vmaSet) StateSave(m state.Sink) {
x.beforeSave()
var root *vmaSegmentDataSlices = x.saveRoot()
- m.SaveValue("root", root)
+ m.SaveValue(0, root)
}
func (x *vmaSet) afterLoad() {}
-func (x *vmaSet) load(m state.Map) {
- m.LoadValue("root", new(*vmaSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*vmaSegmentDataSlices)) })
+
+func (x *vmaSet) StateLoad(m state.Source) {
+ m.LoadValue(0, new(*vmaSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*vmaSegmentDataSlices)) })
+}
+
+func (x *vmanode) StateTypeName() string {
+ return "pkg/sentry/mm.vmanode"
+}
+
+func (x *vmanode) StateFields() []string {
+ return []string{
+ "nrSegments",
+ "parent",
+ "parentIndex",
+ "hasChildren",
+ "maxGap",
+ "keys",
+ "values",
+ "children",
+ }
}
func (x *vmanode) beforeSave() {}
-func (x *vmanode) save(m state.Map) {
+
+func (x *vmanode) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("nrSegments", &x.nrSegments)
- m.Save("parent", &x.parent)
- m.Save("parentIndex", &x.parentIndex)
- m.Save("hasChildren", &x.hasChildren)
- m.Save("maxGap", &x.maxGap)
- m.Save("keys", &x.keys)
- m.Save("values", &x.values)
- m.Save("children", &x.children)
+ m.Save(0, &x.nrSegments)
+ m.Save(1, &x.parent)
+ m.Save(2, &x.parentIndex)
+ m.Save(3, &x.hasChildren)
+ m.Save(4, &x.maxGap)
+ m.Save(5, &x.keys)
+ m.Save(6, &x.values)
+ m.Save(7, &x.children)
}
func (x *vmanode) afterLoad() {}
-func (x *vmanode) load(m state.Map) {
- m.Load("nrSegments", &x.nrSegments)
- m.Load("parent", &x.parent)
- m.Load("parentIndex", &x.parentIndex)
- m.Load("hasChildren", &x.hasChildren)
- m.Load("maxGap", &x.maxGap)
- m.Load("keys", &x.keys)
- m.Load("values", &x.values)
- m.Load("children", &x.children)
+
+func (x *vmanode) StateLoad(m state.Source) {
+ m.Load(0, &x.nrSegments)
+ m.Load(1, &x.parent)
+ m.Load(2, &x.parentIndex)
+ m.Load(3, &x.hasChildren)
+ m.Load(4, &x.maxGap)
+ m.Load(5, &x.keys)
+ m.Load(6, &x.values)
+ m.Load(7, &x.children)
+}
+
+func (x *vmaSegmentDataSlices) StateTypeName() string {
+ return "pkg/sentry/mm.vmaSegmentDataSlices"
+}
+
+func (x *vmaSegmentDataSlices) StateFields() []string {
+ return []string{
+ "Start",
+ "End",
+ "Values",
+ }
}
func (x *vmaSegmentDataSlices) beforeSave() {}
-func (x *vmaSegmentDataSlices) save(m state.Map) {
+
+func (x *vmaSegmentDataSlices) StateSave(m state.Sink) {
x.beforeSave()
- m.Save("Start", &x.Start)
- m.Save("End", &x.End)
- m.Save("Values", &x.Values)
+ m.Save(0, &x.Start)
+ m.Save(1, &x.End)
+ m.Save(2, &x.Values)
}
func (x *vmaSegmentDataSlices) afterLoad() {}
-func (x *vmaSegmentDataSlices) load(m state.Map) {
- m.Load("Start", &x.Start)
- m.Load("End", &x.End)
- m.Load("Values", &x.Values)
+
+func (x *vmaSegmentDataSlices) StateLoad(m state.Source) {
+ m.Load(0, &x.Start)
+ m.Load(1, &x.End)
+ m.Load(2, &x.Values)
}
func init() {
- state.Register("pkg/sentry/mm.aioManager", (*aioManager)(nil), state.Fns{Save: (*aioManager).save, Load: (*aioManager).load})
- state.Register("pkg/sentry/mm.ioResult", (*ioResult)(nil), state.Fns{Save: (*ioResult).save, Load: (*ioResult).load})
- state.Register("pkg/sentry/mm.AIOContext", (*AIOContext)(nil), state.Fns{Save: (*AIOContext).save, Load: (*AIOContext).load})
- state.Register("pkg/sentry/mm.aioMappable", (*aioMappable)(nil), state.Fns{Save: (*aioMappable).save, Load: (*aioMappable).load})
- state.Register("pkg/sentry/mm.fileRefcountSet", (*fileRefcountSet)(nil), state.Fns{Save: (*fileRefcountSet).save, Load: (*fileRefcountSet).load})
- state.Register("pkg/sentry/mm.fileRefcountnode", (*fileRefcountnode)(nil), state.Fns{Save: (*fileRefcountnode).save, Load: (*fileRefcountnode).load})
- state.Register("pkg/sentry/mm.fileRefcountSegmentDataSlices", (*fileRefcountSegmentDataSlices)(nil), state.Fns{Save: (*fileRefcountSegmentDataSlices).save, Load: (*fileRefcountSegmentDataSlices).load})
- state.Register("pkg/sentry/mm.ioList", (*ioList)(nil), state.Fns{Save: (*ioList).save, Load: (*ioList).load})
- state.Register("pkg/sentry/mm.ioEntry", (*ioEntry)(nil), state.Fns{Save: (*ioEntry).save, Load: (*ioEntry).load})
- state.Register("pkg/sentry/mm.MemoryManager", (*MemoryManager)(nil), state.Fns{Save: (*MemoryManager).save, Load: (*MemoryManager).load})
- state.Register("pkg/sentry/mm.vma", (*vma)(nil), state.Fns{Save: (*vma).save, Load: (*vma).load})
- state.Register("pkg/sentry/mm.pma", (*pma)(nil), state.Fns{Save: (*pma).save, Load: (*pma).load})
- state.Register("pkg/sentry/mm.privateRefs", (*privateRefs)(nil), state.Fns{Save: (*privateRefs).save, Load: (*privateRefs).load})
- state.Register("pkg/sentry/mm.pmaSet", (*pmaSet)(nil), state.Fns{Save: (*pmaSet).save, Load: (*pmaSet).load})
- state.Register("pkg/sentry/mm.pmanode", (*pmanode)(nil), state.Fns{Save: (*pmanode).save, Load: (*pmanode).load})
- state.Register("pkg/sentry/mm.pmaSegmentDataSlices", (*pmaSegmentDataSlices)(nil), state.Fns{Save: (*pmaSegmentDataSlices).save, Load: (*pmaSegmentDataSlices).load})
- state.Register("pkg/sentry/mm.SpecialMappable", (*SpecialMappable)(nil), state.Fns{Save: (*SpecialMappable).save, Load: (*SpecialMappable).load})
- state.Register("pkg/sentry/mm.vmaSet", (*vmaSet)(nil), state.Fns{Save: (*vmaSet).save, Load: (*vmaSet).load})
- state.Register("pkg/sentry/mm.vmanode", (*vmanode)(nil), state.Fns{Save: (*vmanode).save, Load: (*vmanode).load})
- state.Register("pkg/sentry/mm.vmaSegmentDataSlices", (*vmaSegmentDataSlices)(nil), state.Fns{Save: (*vmaSegmentDataSlices).save, Load: (*vmaSegmentDataSlices).load})
+ state.Register((*aioManager)(nil))
+ state.Register((*ioResult)(nil))
+ state.Register((*AIOContext)(nil))
+ state.Register((*aioMappable)(nil))
+ state.Register((*fileRefcountSet)(nil))
+ state.Register((*fileRefcountnode)(nil))
+ state.Register((*fileRefcountSegmentDataSlices)(nil))
+ state.Register((*ioList)(nil))
+ state.Register((*ioEntry)(nil))
+ state.Register((*MemoryManager)(nil))
+ state.Register((*vma)(nil))
+ state.Register((*pma)(nil))
+ state.Register((*privateRefs)(nil))
+ state.Register((*pmaSet)(nil))
+ state.Register((*pmanode)(nil))
+ state.Register((*pmaSegmentDataSlices)(nil))
+ state.Register((*SpecialMappable)(nil))
+ state.Register((*vmaSet)(nil))
+ state.Register((*vmanode)(nil))
+ state.Register((*vmaSegmentDataSlices)(nil))
}