You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose is_emergency_collection to VM bindings (#997)
`is_emergency_collection` is useful during weak reference processing.
JVMs can choose not to retain referents of `SoftReference` during
emergency GC.
The `is_emergency_collection` function was moved from `Plan` to
`GlobalState` in
57af17f.
After that, the `MMTK:state` field is private and inaccessible to VM
bindings. VM bindings that depend on the to-be-deprecated built-in
`ReferenceProcessor` still work because it is part of the `mmtk` crate,
and can `mmtk.state.is_emergency_collection`. However, VM bindings that
do weak reference processing on the VM side using the
`Scanning::process_weak_refs` API can no longer call that function. This
makes [this PR](mmtk/mmtk-jikesrvm#150) unable
to merge. In the future, the OpenJDK binding will also need it when it
off-loads weak reference processing to the binding side.
This PR adds a public API function `MMTK::is_emergency_collection` which
can be called by the VM bindings.
0 commit comments