File tree 3 files changed +9
-4
lines changed
rustc_incremental/src/persist
rustc_query_system/src/dep_graph
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<'_>) {
49
49
} ,
50
50
move || {
51
51
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 ) {
53
53
sess. err ( & format ! (
54
54
"failed to write dependency graph to `{}`: {}" ,
55
55
staging_dep_graph_path. display( ) ,
Original file line number Diff line number Diff line change @@ -789,8 +789,12 @@ impl<K: DepKind> DepGraph<K> {
789
789
}
790
790
}
791
791
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
+ }
794
798
}
795
799
796
800
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> {
304
304
self . status . lock ( ) . encode_node ( & node, & self . record_graph )
305
305
}
306
306
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" ) ;
308
309
self . status . into_inner ( ) . finish ( )
309
310
}
310
311
}
You can’t perform that action at this time.
0 commit comments