Struct mmtk::util::statistics::counter::event_counter::EventCounter
source · pub struct EventCounter {
name: String,
pub implicitly_start: bool,
merge_phases: bool,
count: Box<[u64; 4096]>,
current_count: u64,
running: bool,
stats: Arc<SharedStats>,
}
Expand description
This file implements a simple event counter (counting number events that occur for each phase).
Fields§
§name: String
§implicitly_start: bool
§merge_phases: bool
§count: Box<[u64; 4096]>
§current_count: u64
§running: bool
§stats: Arc<SharedStats>
Implementations§
source§impl EventCounter
impl EventCounter
pub fn new( name: String, stats: Arc<SharedStats>, implicitly_start: bool, merge_phases: bool ) -> Self
pub fn print_current(&self)
fn print_value(&self, value: u64)
Trait Implementations§
source§impl Counter for EventCounter
impl Counter for EventCounter
source§fn phase_change(&mut self, old_phase: usize)
fn phase_change(&mut self, old_phase: usize)
Signal a change in GC phase. Read more
source§fn print_count(&self, phase: usize)
fn print_count(&self, phase: usize)
Print the counter value for a particular phase Read more
source§fn get_total(&self, other: Option<bool>) -> u64
fn get_total(&self, other: Option<bool>) -> u64
Get the total count over past phases Read more
source§fn print_last(&self)
fn print_last(&self)
Print the count of the last phases
source§fn merge_phases(&self) -> bool
fn merge_phases(&self) -> bool
Whether the counter merges other and stw phases.
source§fn implicitly_start(&self) -> bool
fn implicitly_start(&self) -> bool
Whether the counter starts implicitly after creation Read more
Auto Trait Implementations§
impl RefUnwindSafe for EventCounter
impl Send for EventCounter
impl Sync for EventCounter
impl Unpin for EventCounter
impl UnwindSafe for EventCounter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more