Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose
is_emergency_collection
to VM bindings (mmtk#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 mmtk@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.
- Loading branch information