This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
rustc_incremental/src/persist
rustc_query_system/src/dep_graph Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ pub fn save_dep_graph(tcx: TyCtxt<'_>) {
4949 } ,
5050 move || {
5151 sess. time ( "incr_comp_persist_dep_graph" , || {
52- if let Err ( err) = tcx. dep_graph . encode ( ) {
52+ if let Err ( err) = tcx. dep_graph . encode ( & tcx . sess . prof ) {
5353 sess. err ( & format ! (
5454 "failed to write dependency graph to `{}`: {}" ,
5555 staging_dep_graph_path. display( ) ,
Original file line number Diff line number Diff line change @@ -789,8 +789,12 @@ impl<K: DepKind> DepGraph<K> {
789789 }
790790 }
791791
792- pub fn encode ( & self ) -> FileEncodeResult {
793- if let Some ( data) = & self . data { data. current . encoder . steal ( ) . finish ( ) } else { Ok ( ( ) ) }
792+ pub fn encode ( & self , profiler : & SelfProfilerRef ) -> FileEncodeResult {
793+ if let Some ( data) = & self . data {
794+ data. current . encoder . steal ( ) . finish ( profiler)
795+ } else {
796+ Ok ( ( ) )
797+ }
794798 }
795799
796800 fn next_virtual_depnode_index ( & self ) -> DepNodeIndex {
Original file line number Diff line number Diff line change @@ -304,7 +304,8 @@ impl<K: DepKind + Encodable<FileEncoder>> GraphEncoder<K> {
304304 self . status . lock ( ) . encode_node ( & node, & self . record_graph )
305305 }
306306
307- pub fn finish ( self ) -> FileEncodeResult {
307+ pub fn finish ( self , profiler : & SelfProfilerRef ) -> FileEncodeResult {
308+ let _prof_timer = profiler. generic_activity ( "incr_comp_encode_dep_graph" ) ;
308309 self . status . into_inner ( ) . finish ( )
309310 }
310311}
You can’t perform that action at this time.
0 commit comments