github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/pgalloc/pgalloc_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package pgalloc
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (r *EvictableRange) StateTypeName() string {
    10  	return "pkg/sentry/pgalloc.EvictableRange"
    11  }
    12  
    13  func (r *EvictableRange) StateFields() []string {
    14  	return []string{
    15  		"Start",
    16  		"End",
    17  	}
    18  }
    19  
    20  func (r *EvictableRange) beforeSave() {}
    21  
    22  // +checklocksignore
    23  func (r *EvictableRange) StateSave(stateSinkObject state.Sink) {
    24  	r.beforeSave()
    25  	stateSinkObject.Save(0, &r.Start)
    26  	stateSinkObject.Save(1, &r.End)
    27  }
    28  
    29  func (r *EvictableRange) afterLoad() {}
    30  
    31  // +checklocksignore
    32  func (r *EvictableRange) StateLoad(stateSourceObject state.Source) {
    33  	stateSourceObject.Load(0, &r.Start)
    34  	stateSourceObject.Load(1, &r.End)
    35  }
    36  
    37  func (s *evictableRangeSet) StateTypeName() string {
    38  	return "pkg/sentry/pgalloc.evictableRangeSet"
    39  }
    40  
    41  func (s *evictableRangeSet) StateFields() []string {
    42  	return []string{
    43  		"root",
    44  	}
    45  }
    46  
    47  func (s *evictableRangeSet) beforeSave() {}
    48  
    49  // +checklocksignore
    50  func (s *evictableRangeSet) StateSave(stateSinkObject state.Sink) {
    51  	s.beforeSave()
    52  	var rootValue *evictableRangeSegmentDataSlices
    53  	rootValue = s.saveRoot()
    54  	stateSinkObject.SaveValue(0, rootValue)
    55  }
    56  
    57  func (s *evictableRangeSet) afterLoad() {}
    58  
    59  // +checklocksignore
    60  func (s *evictableRangeSet) StateLoad(stateSourceObject state.Source) {
    61  	stateSourceObject.LoadValue(0, new(*evictableRangeSegmentDataSlices), func(y any) { s.loadRoot(y.(*evictableRangeSegmentDataSlices)) })
    62  }
    63  
    64  func (n *evictableRangenode) StateTypeName() string {
    65  	return "pkg/sentry/pgalloc.evictableRangenode"
    66  }
    67  
    68  func (n *evictableRangenode) StateFields() []string {
    69  	return []string{
    70  		"nrSegments",
    71  		"parent",
    72  		"parentIndex",
    73  		"hasChildren",
    74  		"maxGap",
    75  		"keys",
    76  		"values",
    77  		"children",
    78  	}
    79  }
    80  
    81  func (n *evictableRangenode) beforeSave() {}
    82  
    83  // +checklocksignore
    84  func (n *evictableRangenode) StateSave(stateSinkObject state.Sink) {
    85  	n.beforeSave()
    86  	stateSinkObject.Save(0, &n.nrSegments)
    87  	stateSinkObject.Save(1, &n.parent)
    88  	stateSinkObject.Save(2, &n.parentIndex)
    89  	stateSinkObject.Save(3, &n.hasChildren)
    90  	stateSinkObject.Save(4, &n.maxGap)
    91  	stateSinkObject.Save(5, &n.keys)
    92  	stateSinkObject.Save(6, &n.values)
    93  	stateSinkObject.Save(7, &n.children)
    94  }
    95  
    96  func (n *evictableRangenode) afterLoad() {}
    97  
    98  // +checklocksignore
    99  func (n *evictableRangenode) StateLoad(stateSourceObject state.Source) {
   100  	stateSourceObject.Load(0, &n.nrSegments)
   101  	stateSourceObject.Load(1, &n.parent)
   102  	stateSourceObject.Load(2, &n.parentIndex)
   103  	stateSourceObject.Load(3, &n.hasChildren)
   104  	stateSourceObject.Load(4, &n.maxGap)
   105  	stateSourceObject.Load(5, &n.keys)
   106  	stateSourceObject.Load(6, &n.values)
   107  	stateSourceObject.Load(7, &n.children)
   108  }
   109  
   110  func (e *evictableRangeSegmentDataSlices) StateTypeName() string {
   111  	return "pkg/sentry/pgalloc.evictableRangeSegmentDataSlices"
   112  }
   113  
   114  func (e *evictableRangeSegmentDataSlices) StateFields() []string {
   115  	return []string{
   116  		"Start",
   117  		"End",
   118  		"Values",
   119  	}
   120  }
   121  
   122  func (e *evictableRangeSegmentDataSlices) beforeSave() {}
   123  
   124  // +checklocksignore
   125  func (e *evictableRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) {
   126  	e.beforeSave()
   127  	stateSinkObject.Save(0, &e.Start)
   128  	stateSinkObject.Save(1, &e.End)
   129  	stateSinkObject.Save(2, &e.Values)
   130  }
   131  
   132  func (e *evictableRangeSegmentDataSlices) afterLoad() {}
   133  
   134  // +checklocksignore
   135  func (e *evictableRangeSegmentDataSlices) StateLoad(stateSourceObject state.Source) {
   136  	stateSourceObject.Load(0, &e.Start)
   137  	stateSourceObject.Load(1, &e.End)
   138  	stateSourceObject.Load(2, &e.Values)
   139  }
   140  
   141  func (u *usageInfo) StateTypeName() string {
   142  	return "pkg/sentry/pgalloc.usageInfo"
   143  }
   144  
   145  func (u *usageInfo) StateFields() []string {
   146  	return []string{
   147  		"kind",
   148  		"knownCommitted",
   149  		"refs",
   150  		"memCgID",
   151  	}
   152  }
   153  
   154  func (u *usageInfo) beforeSave() {}
   155  
   156  // +checklocksignore
   157  func (u *usageInfo) StateSave(stateSinkObject state.Sink) {
   158  	u.beforeSave()
   159  	stateSinkObject.Save(0, &u.kind)
   160  	stateSinkObject.Save(1, &u.knownCommitted)
   161  	stateSinkObject.Save(2, &u.refs)
   162  	stateSinkObject.Save(3, &u.memCgID)
   163  }
   164  
   165  func (u *usageInfo) afterLoad() {}
   166  
   167  // +checklocksignore
   168  func (u *usageInfo) StateLoad(stateSourceObject state.Source) {
   169  	stateSourceObject.Load(0, &u.kind)
   170  	stateSourceObject.Load(1, &u.knownCommitted)
   171  	stateSourceObject.Load(2, &u.refs)
   172  	stateSourceObject.Load(3, &u.memCgID)
   173  }
   174  
   175  func (s *reclaimSet) StateTypeName() string {
   176  	return "pkg/sentry/pgalloc.reclaimSet"
   177  }
   178  
   179  func (s *reclaimSet) StateFields() []string {
   180  	return []string{
   181  		"root",
   182  	}
   183  }
   184  
   185  func (s *reclaimSet) beforeSave() {}
   186  
   187  // +checklocksignore
   188  func (s *reclaimSet) StateSave(stateSinkObject state.Sink) {
   189  	s.beforeSave()
   190  	var rootValue *reclaimSegmentDataSlices
   191  	rootValue = s.saveRoot()
   192  	stateSinkObject.SaveValue(0, rootValue)
   193  }
   194  
   195  func (s *reclaimSet) afterLoad() {}
   196  
   197  // +checklocksignore
   198  func (s *reclaimSet) StateLoad(stateSourceObject state.Source) {
   199  	stateSourceObject.LoadValue(0, new(*reclaimSegmentDataSlices), func(y any) { s.loadRoot(y.(*reclaimSegmentDataSlices)) })
   200  }
   201  
   202  func (n *reclaimnode) StateTypeName() string {
   203  	return "pkg/sentry/pgalloc.reclaimnode"
   204  }
   205  
   206  func (n *reclaimnode) StateFields() []string {
   207  	return []string{
   208  		"nrSegments",
   209  		"parent",
   210  		"parentIndex",
   211  		"hasChildren",
   212  		"maxGap",
   213  		"keys",
   214  		"values",
   215  		"children",
   216  	}
   217  }
   218  
   219  func (n *reclaimnode) beforeSave() {}
   220  
   221  // +checklocksignore
   222  func (n *reclaimnode) StateSave(stateSinkObject state.Sink) {
   223  	n.beforeSave()
   224  	stateSinkObject.Save(0, &n.nrSegments)
   225  	stateSinkObject.Save(1, &n.parent)
   226  	stateSinkObject.Save(2, &n.parentIndex)
   227  	stateSinkObject.Save(3, &n.hasChildren)
   228  	stateSinkObject.Save(4, &n.maxGap)
   229  	stateSinkObject.Save(5, &n.keys)
   230  	stateSinkObject.Save(6, &n.values)
   231  	stateSinkObject.Save(7, &n.children)
   232  }
   233  
   234  func (n *reclaimnode) afterLoad() {}
   235  
   236  // +checklocksignore
   237  func (n *reclaimnode) StateLoad(stateSourceObject state.Source) {
   238  	stateSourceObject.Load(0, &n.nrSegments)
   239  	stateSourceObject.Load(1, &n.parent)
   240  	stateSourceObject.Load(2, &n.parentIndex)
   241  	stateSourceObject.Load(3, &n.hasChildren)
   242  	stateSourceObject.Load(4, &n.maxGap)
   243  	stateSourceObject.Load(5, &n.keys)
   244  	stateSourceObject.Load(6, &n.values)
   245  	stateSourceObject.Load(7, &n.children)
   246  }
   247  
   248  func (r *reclaimSegmentDataSlices) StateTypeName() string {
   249  	return "pkg/sentry/pgalloc.reclaimSegmentDataSlices"
   250  }
   251  
   252  func (r *reclaimSegmentDataSlices) StateFields() []string {
   253  	return []string{
   254  		"Start",
   255  		"End",
   256  		"Values",
   257  	}
   258  }
   259  
   260  func (r *reclaimSegmentDataSlices) beforeSave() {}
   261  
   262  // +checklocksignore
   263  func (r *reclaimSegmentDataSlices) StateSave(stateSinkObject state.Sink) {
   264  	r.beforeSave()
   265  	stateSinkObject.Save(0, &r.Start)
   266  	stateSinkObject.Save(1, &r.End)
   267  	stateSinkObject.Save(2, &r.Values)
   268  }
   269  
   270  func (r *reclaimSegmentDataSlices) afterLoad() {}
   271  
   272  // +checklocksignore
   273  func (r *reclaimSegmentDataSlices) StateLoad(stateSourceObject state.Source) {
   274  	stateSourceObject.Load(0, &r.Start)
   275  	stateSourceObject.Load(1, &r.End)
   276  	stateSourceObject.Load(2, &r.Values)
   277  }
   278  
   279  func (s *usageSet) StateTypeName() string {
   280  	return "pkg/sentry/pgalloc.usageSet"
   281  }
   282  
   283  func (s *usageSet) StateFields() []string {
   284  	return []string{
   285  		"root",
   286  	}
   287  }
   288  
   289  func (s *usageSet) beforeSave() {}
   290  
   291  // +checklocksignore
   292  func (s *usageSet) StateSave(stateSinkObject state.Sink) {
   293  	s.beforeSave()
   294  	var rootValue *usageSegmentDataSlices
   295  	rootValue = s.saveRoot()
   296  	stateSinkObject.SaveValue(0, rootValue)
   297  }
   298  
   299  func (s *usageSet) afterLoad() {}
   300  
   301  // +checklocksignore
   302  func (s *usageSet) StateLoad(stateSourceObject state.Source) {
   303  	stateSourceObject.LoadValue(0, new(*usageSegmentDataSlices), func(y any) { s.loadRoot(y.(*usageSegmentDataSlices)) })
   304  }
   305  
   306  func (n *usagenode) StateTypeName() string {
   307  	return "pkg/sentry/pgalloc.usagenode"
   308  }
   309  
   310  func (n *usagenode) StateFields() []string {
   311  	return []string{
   312  		"nrSegments",
   313  		"parent",
   314  		"parentIndex",
   315  		"hasChildren",
   316  		"maxGap",
   317  		"keys",
   318  		"values",
   319  		"children",
   320  	}
   321  }
   322  
   323  func (n *usagenode) beforeSave() {}
   324  
   325  // +checklocksignore
   326  func (n *usagenode) StateSave(stateSinkObject state.Sink) {
   327  	n.beforeSave()
   328  	stateSinkObject.Save(0, &n.nrSegments)
   329  	stateSinkObject.Save(1, &n.parent)
   330  	stateSinkObject.Save(2, &n.parentIndex)
   331  	stateSinkObject.Save(3, &n.hasChildren)
   332  	stateSinkObject.Save(4, &n.maxGap)
   333  	stateSinkObject.Save(5, &n.keys)
   334  	stateSinkObject.Save(6, &n.values)
   335  	stateSinkObject.Save(7, &n.children)
   336  }
   337  
   338  func (n *usagenode) afterLoad() {}
   339  
   340  // +checklocksignore
   341  func (n *usagenode) StateLoad(stateSourceObject state.Source) {
   342  	stateSourceObject.Load(0, &n.nrSegments)
   343  	stateSourceObject.Load(1, &n.parent)
   344  	stateSourceObject.Load(2, &n.parentIndex)
   345  	stateSourceObject.Load(3, &n.hasChildren)
   346  	stateSourceObject.Load(4, &n.maxGap)
   347  	stateSourceObject.Load(5, &n.keys)
   348  	stateSourceObject.Load(6, &n.values)
   349  	stateSourceObject.Load(7, &n.children)
   350  }
   351  
   352  func (u *usageSegmentDataSlices) StateTypeName() string {
   353  	return "pkg/sentry/pgalloc.usageSegmentDataSlices"
   354  }
   355  
   356  func (u *usageSegmentDataSlices) StateFields() []string {
   357  	return []string{
   358  		"Start",
   359  		"End",
   360  		"Values",
   361  	}
   362  }
   363  
   364  func (u *usageSegmentDataSlices) beforeSave() {}
   365  
   366  // +checklocksignore
   367  func (u *usageSegmentDataSlices) StateSave(stateSinkObject state.Sink) {
   368  	u.beforeSave()
   369  	stateSinkObject.Save(0, &u.Start)
   370  	stateSinkObject.Save(1, &u.End)
   371  	stateSinkObject.Save(2, &u.Values)
   372  }
   373  
   374  func (u *usageSegmentDataSlices) afterLoad() {}
   375  
   376  // +checklocksignore
   377  func (u *usageSegmentDataSlices) StateLoad(stateSourceObject state.Source) {
   378  	stateSourceObject.Load(0, &u.Start)
   379  	stateSourceObject.Load(1, &u.End)
   380  	stateSourceObject.Load(2, &u.Values)
   381  }
   382  
   383  func init() {
   384  	state.Register((*EvictableRange)(nil))
   385  	state.Register((*evictableRangeSet)(nil))
   386  	state.Register((*evictableRangenode)(nil))
   387  	state.Register((*evictableRangeSegmentDataSlices)(nil))
   388  	state.Register((*usageInfo)(nil))
   389  	state.Register((*reclaimSet)(nil))
   390  	state.Register((*reclaimnode)(nil))
   391  	state.Register((*reclaimSegmentDataSlices)(nil))
   392  	state.Register((*usageSet)(nil))
   393  	state.Register((*usagenode)(nil))
   394  	state.Register((*usageSegmentDataSlices)(nil))
   395  }