@@ -134,7 +134,6 @@ impl<D: Deps> DepGraph<D> {
134134
135135 // Instantiate a dependy-less node only once for anonymous queries.
136136 let _green_node_index = current. intern_new_node (
137- profiler,
138137 DepNode { kind : D :: DEP_KIND_NULL , hash : current. anon_id_seed . into ( ) } ,
139138 EdgesVec :: new ( ) ,
140139 Fingerprint :: ZERO ,
@@ -443,12 +442,7 @@ impl<D: Deps> DepGraphData<D> {
443442 hash : self . current . anon_id_seed . combine ( hasher. finish ( ) ) . into ( ) ,
444443 } ;
445444
446- self . current . intern_new_node (
447- cx. profiler ( ) ,
448- target_dep_node,
449- task_deps,
450- Fingerprint :: ZERO ,
451- )
445+ self . current . intern_new_node ( target_dep_node, task_deps, Fingerprint :: ZERO )
452446 }
453447 } ;
454448
@@ -871,11 +865,8 @@ impl<D: Deps> DepGraphData<D> {
871865
872866 // We allocating an entry for the node in the current dependency graph and
873867 // adding all the appropriate edges imported from the previous graph
874- let dep_node_index = self . current . promote_node_and_deps_to_current (
875- qcx. dep_context ( ) . profiler ( ) ,
876- & self . previous ,
877- prev_dep_node_index,
878- ) ;
868+ let dep_node_index =
869+ self . current . promote_node_and_deps_to_current ( & self . previous , prev_dep_node_index) ;
879870
880871 // ... emitting any stored diagnostic ...
881872
@@ -981,12 +972,8 @@ impl<D: Deps> DepGraph<D> {
981972 }
982973 }
983974
984- pub fn finish_encoding ( & self , profiler : & SelfProfilerRef ) -> FileEncodeResult {
985- if let Some ( data) = & self . data {
986- data. current . encoder . steal ( ) . finish ( profiler)
987- } else {
988- Ok ( 0 )
989- }
975+ pub fn finish_encoding ( & self ) -> FileEncodeResult {
976+ if let Some ( data) = & self . data { data. current . encoder . steal ( ) . finish ( ) } else { Ok ( 0 ) }
990977 }
991978
992979 pub ( crate ) fn next_virtual_depnode_index ( & self ) -> DepNodeIndex {
@@ -1150,6 +1137,7 @@ impl<D: Deps> CurrentDepGraph<D> {
11501137 prev_graph_node_count,
11511138 record_graph,
11521139 record_stats,
1140+ profiler,
11531141 ) ) ,
11541142 new_node_to_index : Sharded :: new ( || {
11551143 FxHashMap :: with_capacity_and_hasher (
@@ -1183,16 +1171,14 @@ impl<D: Deps> CurrentDepGraph<D> {
11831171 #[ inline( always) ]
11841172 fn intern_new_node (
11851173 & self ,
1186- profiler : & SelfProfilerRef ,
11871174 key : DepNode ,
11881175 edges : EdgesVec ,
11891176 current_fingerprint : Fingerprint ,
11901177 ) -> DepNodeIndex {
11911178 let dep_node_index = match self . new_node_to_index . lock_shard_by_value ( & key) . entry ( key) {
11921179 Entry :: Occupied ( entry) => * entry. get ( ) ,
11931180 Entry :: Vacant ( entry) => {
1194- let dep_node_index =
1195- self . encoder . borrow ( ) . send ( profiler, key, current_fingerprint, edges) ;
1181+ let dep_node_index = self . encoder . borrow ( ) . send ( key, current_fingerprint, edges) ;
11961182 entry. insert ( dep_node_index) ;
11971183 dep_node_index
11981184 }
@@ -1223,8 +1209,7 @@ impl<D: Deps> CurrentDepGraph<D> {
12231209 let dep_node_index = match prev_index_to_index[ prev_index] {
12241210 Some ( dep_node_index) => dep_node_index,
12251211 None => {
1226- let dep_node_index =
1227- self . encoder . borrow ( ) . send ( profiler, key, fingerprint, edges) ;
1212+ let dep_node_index = self . encoder . borrow ( ) . send ( key, fingerprint, edges) ;
12281213 prev_index_to_index[ prev_index] = Some ( dep_node_index) ;
12291214 dep_node_index
12301215 }
@@ -1261,15 +1246,14 @@ impl<D: Deps> CurrentDepGraph<D> {
12611246 let fingerprint = fingerprint. unwrap_or ( Fingerprint :: ZERO ) ;
12621247
12631248 // This is a new node: it didn't exist in the previous compilation session.
1264- let dep_node_index = self . intern_new_node ( profiler , key, edges, fingerprint) ;
1249+ let dep_node_index = self . intern_new_node ( key, edges, fingerprint) ;
12651250
12661251 ( dep_node_index, None )
12671252 }
12681253 }
12691254
12701255 fn promote_node_and_deps_to_current (
12711256 & self ,
1272- profiler : & SelfProfilerRef ,
12731257 prev_graph : & SerializedDepGraph ,
12741258 prev_index : SerializedDepNodeIndex ,
12751259 ) -> DepNodeIndex {
@@ -1286,7 +1270,7 @@ impl<D: Deps> CurrentDepGraph<D> {
12861270 . map ( |i| prev_index_to_index[ i] . unwrap ( ) )
12871271 . collect ( ) ;
12881272 let fingerprint = prev_graph. fingerprint_by_index ( prev_index) ;
1289- let dep_node_index = self . encoder . borrow ( ) . send ( profiler , key, fingerprint, edges) ;
1273+ let dep_node_index = self . encoder . borrow ( ) . send ( key, fingerprint, edges) ;
12901274 prev_index_to_index[ prev_index] = Some ( dep_node_index) ;
12911275 #[ cfg( debug_assertions) ]
12921276 self . record_edge ( dep_node_index, key, fingerprint) ;
0 commit comments