pub(crate) struct GraphEncoder {
profiler: SelfProfilerRef,
status: EncoderState,
retained_graph: Option<Lock<RetainedDepGraph>>,
}Fields§
§profiler: SelfProfilerRef§status: EncoderState§retained_graph: Option<Lock<RetainedDepGraph>>In-memory copy of the dep graph; only present if -Zquery-dep-graph is set.
Implementations§
Source§impl GraphEncoder
impl GraphEncoder
pub(crate) fn new( sess: &Session, encoder: FileEncoder, prev_index_space_len: usize, previous: Arc<SerializedDepGraph>, ) -> Self
pub(crate) fn retained_dep_graph(&self) -> Option<RetainedDepGraph>
Sourcepub(crate) fn send_new(
&self,
node: DepNode,
value_fingerprint: Fingerprint,
edges: &[DepNodeIndex],
) -> DepNodeIndex
pub(crate) fn send_new( &self, node: DepNode, value_fingerprint: Fingerprint, edges: &[DepNodeIndex], ) -> DepNodeIndex
Encodes a node that does not exists in the previous graph.
Sourcepub(crate) fn send_and_color(
&self,
prev_index: SerializedDepNodeIndex,
colors: &DepNodeColorMap,
node: DepNode,
value_fingerprint: Fingerprint,
edges: &[DepNodeIndex],
is_green: bool,
) -> DepNodeIndex
pub(crate) fn send_and_color( &self, prev_index: SerializedDepNodeIndex, colors: &DepNodeColorMap, node: DepNode, value_fingerprint: Fingerprint, edges: &[DepNodeIndex], is_green: bool, ) -> DepNodeIndex
Encodes a node that exists in the previous graph, but was re-executed.
This will also ensure the dep node is colored either red or green.
Sourcepub(crate) fn send_promoted(
&self,
prev_index: SerializedDepNodeIndex,
colors: &DepNodeColorMap,
edges: &[DepNodeIndex],
) -> Option<DepNodeIndex>
pub(crate) fn send_promoted( &self, prev_index: SerializedDepNodeIndex, colors: &DepNodeColorMap, edges: &[DepNodeIndex], ) -> Option<DepNodeIndex>
Encodes a node that was promoted from the previous graph. It reads the information directly from the previous dep graph and expects all edges to already have a new dep node index assigned.
Tries to mark the dep node green, and returns Some if it is now green, or None if had already been concurrently marked red.
pub(crate) fn finish(&self, current: &CurrentDepGraph) -> FileEncodeResult
Auto Trait Implementations§
impl !Freeze for GraphEncoder
impl !RefUnwindSafe for GraphEncoder
impl !Sync for GraphEncoder
impl !UnwindSafe for GraphEncoder
impl DynSend for GraphEncoderwhere
Arc<SelfProfiler>: DynSend,
InternalBitFlags: DynSend,
Atomic<u64>: DynSend,
Arc<SerializedDepGraph>: DynSend,
Lock<Option<FileEncoder>>: DynSend,
Box<[CacheAligned<RefCell<LocalEncoderState>>]>: DynSend,
Arc<RegistryData>: DynSend,
Lock<HashMap<DepKind, Stat, FxBuildHasher>>: DynSend,
Lock<RetainedDepGraph>: DynSend,
impl DynSync for GraphEncoderwhere
Arc<SelfProfiler>: DynSync,
InternalBitFlags: DynSync,
Atomic<u64>: DynSync,
Arc<SerializedDepGraph>: DynSync,
Lock<Option<FileEncoder>>: DynSync,
WorkerLocal<RefCell<LocalEncoderState>>: DynSync,
Lock<HashMap<DepKind, Stat, FxBuildHasher>>: DynSync,
Lock<RetainedDepGraph>: DynSync,
impl Forget for GraphEncoder
impl Move for GraphEncoder
impl Send for GraphEncoderwhere
Arc<SelfProfiler>: Send,
InternalBitFlags: Send,
Atomic<u64>: Send,
Arc<SerializedDepGraph>: Send,
Cell<bool>: Send,
Atomic<u8>: Send,
BoxRaw<[u8; 65536]>: Send,
I32NotAllOnes: Send,
Repr: Send,
RawVecInner: Send,
BoxRaw<dyn FnMut(&[u8]) + Send>: Send,
BoxRaw<[CacheAligned<RefCell<LocalEncoderState>>]>: Send,
Arc<RegistryData>: Send,
RawTable<(DepKind, Stat)>: Send,
IndexVec<NodeIndex, Node<DepNode>>: Send,
RawTable<(DepNode, NodeIndex)>: Send,
impl Unpin for GraphEncoderwhere
Arc<SelfProfiler>: Unpin,
InternalBitFlags: Unpin,
Align8<u64>: Unpin,
Arc<SerializedDepGraph>: Unpin,
Align1<u8>: Unpin,
Box<[u8; 65536]>: Unpin,
I32NotAllOnes: Unpin,
*const () is !null: Unpin,
&'static SimpleMessage: Unpin,
*const Custom is !null: Unpin,
*const u8 is !null: Unpin,
Box<dyn FnMut(&[u8]) + Send>: Unpin,
Box<[CacheAligned<RefCell<LocalEncoderState>>]>: Unpin,
Arc<RegistryData>: Unpin,
impl UnsafeUnpin for GraphEncoderwhere
*const ArcInner<SelfProfiler> is !null: UnsafeUnpin,
PhantomData<ArcInner<SelfProfiler>>: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
Align8<u64>: UnsafeUnpin,
*const ArcInner<SerializedDepGraph> is !null: UnsafeUnpin,
PhantomData<ArcInner<SerializedDepGraph>>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const [u8; 65536] is !null: UnsafeUnpin,
PhantomData<[u8; 65536]>: UnsafeUnpin,
I32NotAllOnes: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const dyn FnMut(&[u8]) + Send is !null: UnsafeUnpin,
PhantomData<dyn FnMut(&[u8]) + Send>: UnsafeUnpin,
*const [CacheAligned<RefCell<LocalEncoderState>>] is !null: UnsafeUnpin,
PhantomData<[CacheAligned<RefCell<LocalEncoderState>>]>: UnsafeUnpin,
*const ArcInner<RegistryData> is !null: UnsafeUnpin,
PhantomData<ArcInner<RegistryData>>: UnsafeUnpin,
PhantomData<(DepKind, Stat)>: UnsafeUnpin,
PhantomData<Node<DepNode>>: UnsafeUnpin,
PhantomData<fn(&NodeIndex)>: UnsafeUnpin,
PhantomData<Edge<()>>: UnsafeUnpin,
PhantomData<(DepNode, NodeIndex)>: UnsafeUnpin,
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
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 272 bytes