Trait mmtk::util::analysis::RtAnalysis
source · pub trait RtAnalysis<VM: VMBinding> {
// Required method
fn set_running(&mut self, running: bool);
// Provided methods
fn alloc_hook(&mut self, _size: usize, _align: usize, _offset: usize) { ... }
fn gc_hook(&mut self, _mmtk: &'static MMTK<VM>) { ... }
}
Expand description
This trait exposes hooks for developers to implement their own analysis routines.
Most traits would want to hook into the Stats
and counters provided by the MMTk
framework that are exposed to the Harness.
The arguments for the hooks should be sufficient, however, if one wishes to add other arguments, then they can create an analysis routine specific function and invoke it in its respective place.