1
1
use rustc_data_structures:: fingerprint:: Fingerprint ;
2
2
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
3
- use rustc_data_structures:: profiling:: { EventId , QueryInvocationId , SelfProfilerRef } ;
3
+ use rustc_data_structures:: profiling:: { QueryInvocationId , SelfProfilerRef } ;
4
4
use rustc_data_structures:: sharded:: { self , Sharded } ;
5
5
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
6
6
use rustc_data_structures:: steal:: Steal ;
@@ -142,7 +142,6 @@ impl<D: Deps> DepGraph<D> {
142
142
143
143
// Instantiate a dependy-less red node only once for anonymous queries.
144
144
let ( red_node_index, red_node_prev_index_and_color) = current. intern_node (
145
- profiler,
146
145
& prev_graph,
147
146
DepNode { kind : D :: DEP_KIND_RED , hash : Fingerprint :: ZERO . into ( ) } ,
148
147
EdgesVec :: new ( ) ,
@@ -371,13 +370,8 @@ impl<D: Deps> DepGraphData<D> {
371
370
hash_result. map ( |f| dcx. with_stable_hashing_context ( |mut hcx| f ( & mut hcx, & result) ) ) ;
372
371
373
372
// Intern the new `DepNode`.
374
- let ( dep_node_index, prev_and_color) = self . current . intern_node (
375
- dcx. profiler ( ) ,
376
- & self . previous ,
377
- key,
378
- edges,
379
- current_fingerprint,
380
- ) ;
373
+ let ( dep_node_index, prev_and_color) =
374
+ self . current . intern_node ( & self . previous , key, edges, current_fingerprint) ;
381
375
382
376
hashing_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
383
377
@@ -579,13 +573,8 @@ impl<D: Deps> DepGraph<D> {
579
573
} ) ;
580
574
581
575
// Intern the new `DepNode` with the dependencies up-to-now.
582
- let ( dep_node_index, prev_and_color) = data. current . intern_node (
583
- cx. profiler ( ) ,
584
- & data. previous ,
585
- node,
586
- edges,
587
- current_fingerprint,
588
- ) ;
576
+ let ( dep_node_index, prev_and_color) =
577
+ data. current . intern_node ( & data. previous , node, edges, current_fingerprint) ;
589
578
590
579
hashing_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
591
580
@@ -1087,12 +1076,6 @@ pub(super) struct CurrentDepGraph<D: Deps> {
1087
1076
/// debugging and only active with `debug_assertions`.
1088
1077
total_read_count : AtomicU64 ,
1089
1078
total_duplicate_read_count : AtomicU64 ,
1090
-
1091
- /// The cached event id for profiling node interning. This saves us
1092
- /// from having to look up the event id every time we intern a node
1093
- /// which may incur too much overhead.
1094
- /// This will be None if self-profiling is disabled.
1095
- node_intern_event_id : Option < EventId > ,
1096
1079
}
1097
1080
1098
1081
impl < D : Deps > CurrentDepGraph < D > {
@@ -1127,10 +1110,6 @@ impl<D: Deps> CurrentDepGraph<D> {
1127
1110
1128
1111
let new_node_count_estimate = 102 * prev_graph_node_count / 100 + 200 ;
1129
1112
1130
- let node_intern_event_id = profiler
1131
- . get_or_alloc_cached_string ( "incr_comp_intern_dep_graph_node" )
1132
- . map ( EventId :: from_label) ;
1133
-
1134
1113
CurrentDepGraph {
1135
1114
encoder : Steal :: new ( GraphEncoder :: new (
1136
1115
encoder,
@@ -1153,7 +1132,6 @@ impl<D: Deps> CurrentDepGraph<D> {
1153
1132
fingerprints : Lock :: new ( IndexVec :: from_elem_n ( None , new_node_count_estimate) ) ,
1154
1133
total_read_count : AtomicU64 :: new ( 0 ) ,
1155
1134
total_duplicate_read_count : AtomicU64 :: new ( 0 ) ,
1156
- node_intern_event_id,
1157
1135
}
1158
1136
}
1159
1137
@@ -1192,16 +1170,11 @@ impl<D: Deps> CurrentDepGraph<D> {
1192
1170
1193
1171
fn intern_node (
1194
1172
& self ,
1195
- profiler : & SelfProfilerRef ,
1196
1173
prev_graph : & SerializedDepGraph ,
1197
1174
key : DepNode ,
1198
1175
edges : EdgesVec ,
1199
1176
fingerprint : Option < Fingerprint > ,
1200
1177
) -> ( DepNodeIndex , Option < ( SerializedDepNodeIndex , DepNodeColor ) > ) {
1201
- // Get timer for profiling `DepNode` interning
1202
- let _node_intern_timer =
1203
- self . node_intern_event_id . map ( |eid| profiler. generic_activity_with_event_id ( eid) ) ;
1204
-
1205
1178
if let Some ( prev_index) = prev_graph. node_to_index_opt ( & key) {
1206
1179
let get_dep_node_index = |fingerprint| {
1207
1180
let mut prev_index_to_index = self . prev_index_to_index . lock ( ) ;
0 commit comments