@@ -134,7 +134,6 @@ impl<D: Deps> DepGraph<D> {
134
134
135
135
// Instantiate a dependy-less node only once for anonymous queries.
136
136
let _green_node_index = current. intern_new_node (
137
- profiler,
138
137
DepNode { kind : D :: DEP_KIND_NULL , hash : current. anon_id_seed . into ( ) } ,
139
138
EdgesVec :: new ( ) ,
140
139
Fingerprint :: ZERO ,
@@ -443,12 +442,7 @@ impl<D: Deps> DepGraphData<D> {
443
442
hash : self . current . anon_id_seed . combine ( hasher. finish ( ) ) . into ( ) ,
444
443
} ;
445
444
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 )
452
446
}
453
447
} ;
454
448
@@ -871,11 +865,8 @@ impl<D: Deps> DepGraphData<D> {
871
865
872
866
// We allocating an entry for the node in the current dependency graph and
873
867
// 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) ;
879
870
880
871
// ... emitting any stored diagnostic ...
881
872
@@ -981,12 +972,8 @@ impl<D: Deps> DepGraph<D> {
981
972
}
982
973
}
983
974
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 ) }
990
977
}
991
978
992
979
pub ( crate ) fn next_virtual_depnode_index ( & self ) -> DepNodeIndex {
@@ -1150,6 +1137,7 @@ impl<D: Deps> CurrentDepGraph<D> {
1150
1137
prev_graph_node_count,
1151
1138
record_graph,
1152
1139
record_stats,
1140
+ profiler,
1153
1141
) ) ,
1154
1142
new_node_to_index : Sharded :: new ( || {
1155
1143
FxHashMap :: with_capacity_and_hasher (
@@ -1183,16 +1171,14 @@ impl<D: Deps> CurrentDepGraph<D> {
1183
1171
#[ inline( always) ]
1184
1172
fn intern_new_node (
1185
1173
& self ,
1186
- profiler : & SelfProfilerRef ,
1187
1174
key : DepNode ,
1188
1175
edges : EdgesVec ,
1189
1176
current_fingerprint : Fingerprint ,
1190
1177
) -> DepNodeIndex {
1191
1178
let dep_node_index = match self . new_node_to_index . lock_shard_by_value ( & key) . entry ( key) {
1192
1179
Entry :: Occupied ( entry) => * entry. get ( ) ,
1193
1180
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) ;
1196
1182
entry. insert ( dep_node_index) ;
1197
1183
dep_node_index
1198
1184
}
@@ -1223,8 +1209,7 @@ impl<D: Deps> CurrentDepGraph<D> {
1223
1209
let dep_node_index = match prev_index_to_index[ prev_index] {
1224
1210
Some ( dep_node_index) => dep_node_index,
1225
1211
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) ;
1228
1213
prev_index_to_index[ prev_index] = Some ( dep_node_index) ;
1229
1214
dep_node_index
1230
1215
}
@@ -1261,15 +1246,14 @@ impl<D: Deps> CurrentDepGraph<D> {
1261
1246
let fingerprint = fingerprint. unwrap_or ( Fingerprint :: ZERO ) ;
1262
1247
1263
1248
// 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) ;
1265
1250
1266
1251
( dep_node_index, None )
1267
1252
}
1268
1253
}
1269
1254
1270
1255
fn promote_node_and_deps_to_current (
1271
1256
& self ,
1272
- profiler : & SelfProfilerRef ,
1273
1257
prev_graph : & SerializedDepGraph ,
1274
1258
prev_index : SerializedDepNodeIndex ,
1275
1259
) -> DepNodeIndex {
@@ -1286,7 +1270,7 @@ impl<D: Deps> CurrentDepGraph<D> {
1286
1270
. map ( |i| prev_index_to_index[ i] . unwrap ( ) )
1287
1271
. collect ( ) ;
1288
1272
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) ;
1290
1274
prev_index_to_index[ prev_index] = Some ( dep_node_index) ;
1291
1275
#[ cfg( debug_assertions) ]
1292
1276
self . record_edge ( dep_node_index, key, fingerprint) ;
0 commit comments