add VM::ALWAYS_TRACE
This commit is contained in:
parent
5518088601
commit
32662e9fc8
2 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,11 @@ pub trait VirtualMachine: Sized + 'static + Send + Sync {
|
|||
type Slot: SlotExtra;
|
||||
type MemorySlice: MemorySlice<SlotType = Self::Slot>;
|
||||
|
||||
|
||||
/// Should we always trace objects? If `true` then `support_slot_enqueing` will always return
|
||||
/// false to MMTk and we will always work through `ObjectTracer` to trace objects.
|
||||
const ALWAYS_TRACE: bool = false;
|
||||
|
||||
/*#[cfg(feature = "address_based_hashing")]
|
||||
const HASH_STATE_SPEC: VMLocalHashStateSpec = VMLocalHashStateSpec::in_header(61);*/
|
||||
/// 1-word local metadata for spaces that may copy objects.
|
||||
|
|
|
@ -124,6 +124,9 @@ impl<VM: VirtualMachine> Scanning<MemoryManager<VM>> for VMKitScanning<VM> {
|
|||
_tls: mmtk::util::VMWorkerThread,
|
||||
object: mmtk::util::ObjectReference,
|
||||
) -> bool {
|
||||
if VM::ALWAYS_TRACE {
|
||||
return true;
|
||||
}
|
||||
let object = VMKitObject::from(object);
|
||||
let metadata = object.header::<VM>().metadata();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue