Struct rustc_data_structures::profiling::SelfProfilerRef[−][src]

pub struct SelfProfilerRef {
    profiler: Option<Arc<SelfProfiler>>,
    event_filter_mask: EventFilter,
    print_verbose_generic_activities: bool,
    print_extra_verbose_generic_activities: bool,
}
Expand description

A reference to the SelfProfiler. It can be cloned and sent across thread boundaries at will.

Fields

profiler: Option<Arc<SelfProfiler>>event_filter_mask: EventFilterprint_verbose_generic_activities: boolprint_extra_verbose_generic_activities: bool

Implementations

impl SelfProfilerRef[src]

pub fn new(
    profiler: Option<Arc<SelfProfiler>>,
    print_verbose_generic_activities: bool,
    print_extra_verbose_generic_activities: bool
) -> SelfProfilerRef
[src]

fn exec<F>(&self, event_filter: EventFilter, f: F) -> TimingGuard<'_> where
    F: for<'a> FnOnce(&'a SelfProfiler) -> TimingGuard<'a>, 
[src]

pub fn verbose_generic_activity<'a>(
    &'a self,
    event_label: &'static str
) -> VerboseTimingGuard<'a>
[src]

Start profiling a verbose generic activity. Profiling continues until the VerboseTimingGuard returned from this call is dropped. In addition to recording a measureme event, “verbose” generic activities also print a timing entry to stdout if the compiler is invoked with -Ztime or -Ztime-passes.

pub fn extra_verbose_generic_activity<'a, A>(
    &'a self,
    event_label: &'static str,
    event_arg: A
) -> VerboseTimingGuard<'a> where
    A: Borrow<str> + Into<String>, 
[src]

Start profiling a extra verbose generic activity. Profiling continues until the VerboseTimingGuard returned from this call is dropped. In addition to recording a measureme event, “extra verbose” generic activities also print a timing entry to stdout if the compiler is invoked with -Ztime-passes.

pub fn generic_activity(&self, event_label: &'static str) -> TimingGuard<'_>[src]

Start profiling a generic activity. Profiling continues until the TimingGuard returned from this call is dropped.

pub fn generic_activity_with_arg<A>(
    &self,
    event_label: &'static str,
    event_arg: A
) -> TimingGuard<'_> where
    A: Borrow<str> + Into<String>, 
[src]

Start profiling a generic activity. Profiling continues until the TimingGuard returned from this call is dropped.

pub fn generic_activity_with_args(
    &self,
    event_label: &'static str,
    event_args: &[String]
) -> TimingGuard<'_>
[src]

pub fn query_provider(&self) -> TimingGuard<'_>[src]

Start profiling a query provider. Profiling continues until the TimingGuard returned from this call is dropped.

pub fn query_cache_hit(&self, query_invocation_id: QueryInvocationId)[src]

Record a query in-memory cache hit.

pub fn query_blocked(&self) -> TimingGuard<'_>[src]

Start profiling a query being blocked on a concurrent execution. Profiling continues until the TimingGuard returned from this call is dropped.

pub fn incr_cache_loading(&self) -> TimingGuard<'_>[src]

Start profiling how long it takes to load a query result from the incremental compilation on-disk cache. Profiling continues until the TimingGuard returned from this call is dropped.

fn instant_query_event(
    &self,
    event_kind: fn(_: &SelfProfiler) -> StringId,
    query_invocation_id: QueryInvocationId,
    event_filter: EventFilter
)
[src]

pub fn with_profiler(&self, f: impl FnOnce(&SelfProfiler))[src]

pub fn enabled(&self) -> bool[src]

pub fn llvm_recording_enabled(&self) -> bool[src]

pub fn get_self_profiler(&self) -> Option<Arc<SelfProfiler>>[src]

Trait Implementations

impl Clone for SelfProfilerRef[src]

fn clone(&self) -> SelfProfilerRef[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !RefUnwindSafe for SelfProfilerRef

impl Send for SelfProfilerRef

impl Sync for SelfProfilerRef

impl Unpin for SelfProfilerRef

impl !UnwindSafe for SelfProfilerRef

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> Erased for T[src]