Expand description
A general scheduler implementation. MMTk uses it to schedule GC-related work.
Modules§
- affinity 🔒
- gc_work 🔒
- stat 🔒Statistics for work packets
- work 🔒
- Counter for work packets
- worker 🔒
- This module contain “goals” which are larger than work packets, and describes what workers are working towards on a high level.
- This module contains
WorkerMonitor
and related types. It purposes includes:
Structs§
- A GC worker. This part is privately owned by a worker thread.
Enums§
- This enum defines all the work bucket types. The scheduler will instantiate a work bucket for each stage defined here.
Traits§
- This defines a GC work packet which are assigned to the
GCWorker
s by the scheduler. Work packets carry payloads that indicate the work to be done. For example, a work packet may contain a pointer to a stack that must be scanned, or it may contain a large buffer of pointers that need to be traced, or it might contain a range of static variables to be scanned, etc. The size of the work packet will need to consider at least two points of tension: the work packet must be large enough to ensure that the costs of managing the work packets do not dominate, and the packet must be small enough that good load balancing is achieved. - An abstract trait for work packets that process object graph edges. Its method
ProcessEdgesWork::trace_object
traces an object and, upon first visit, enqueues it into an internal queue inside theProcessEdgesWork
instance. Each implementation of this trait implementtrace_object
differently. DuringPlan::schedule_collection
, plans select (usually viaGCWorkContext
) specialized implementations of this trait to be used during each trace according the nature of each trace, such as whether it is a nursery collection, whether it is a defrag collection, whether it pins objects, etc.