-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with the public API #658
Comments
VMs will access them, e.g. max non LOS object size, the barrier that a plan is using, etc. They need those info to implement fastpaths. We could set visibility separately for each field in |
If we plan to remove |
The public API of the mmtk-core to the VM is defined as all public items in the
mmtk-core
crate. Now they are fully listed here: https://www.mmtk.io/mmtk-core/public-doc/plan/index.htmlWe can now observe problems by looking at that document.
memory_manager
It is a legacy from JikesRVM MMTk. It contains many static (Java) or top-level (Rust) functions. They used to be the set of functions MMTk provide to JikesRVM. The problems of the
memory_manager
module in Rust MMTk are:I suggest make transition gradually
memory_manager
MMTK
.memory_manager::bind_mutator
toMMTK::bind_mutator
memory_manager::alloc
toMutator::alloc
memory_manager::malloc
toutil::malloc::malloc
. Exposeutil::malloc
aspub
.memory_manager
module.Things that shouldn't have been exported
The following are about plans:
plan::Plan
: Containsdyn
methods of a plan. A VM shouldn't directly interact with plans.plan::PlanConstraints
: Constraints of a plan. VMs probably never access them directly, but the VM does need to filter plans based on some criteria, such as whether a plan can pin objects.The following are for work packets and computing the transitive closure. The VM used to create work packets which involves some of tracing, but we refactored the API before, and the VMs never see work packets since then. Now they shouldn't be exposed.
Some VMs used to do some hacks to implement object-enqueuing tracing. That needed
ProcessEdgesWork
and work-packet-related APIs, too. But they are not needed now.scheduler::ProcessEdgesWork
: VMs used to create this work packet to scan VM-specific roots.scheduler::ScanStackRoot
: VMs used to create this work packet to scan stack roots.scheduler::WorkBucketStage
: When VMs createScanStackRoot
, they specify the work bucket stage.memory_manager::add_work_packet
: VMs used to add work packets using this APImemory_manager::add_work_packets
: and this API.scheduler::GCWork
: Used bymemory_manager::add_work_packet
.These may be accidentally exposed
plan::ObjectQueue
: Formerly calledTransitvieClosure
, it is used by theProcessEdgesWork
work packet to collect nodes while tracing objects.plan::VectorObjectQueue
: An implementation ofObjectQueue
using vector.plan::ObjectsClosure
: Used by theScanObjects
work packet to collect edges while scanning objects.plan::PolicyCopyContext
: Used for copying objects.scheduler::CoordinatorWork
: Work packets done by the coordinator. The only coordinator work now isStopMutators
.Utils
We need to look into the
util
module more carefullyThe text was updated successfully, but these errors were encountered: