11use rustc_data_structures:: fingerprint:: Fingerprint ;
22use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
3- use rustc_data_structures:: profiling:: { EventId , QueryInvocationId , SelfProfilerRef } ;
3+ use rustc_data_structures:: profiling:: { QueryInvocationId , SelfProfilerRef } ;
44use rustc_data_structures:: sharded:: { self , Sharded } ;
55use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
66use rustc_data_structures:: steal:: Steal ;
@@ -142,7 +142,6 @@ impl<D: Deps> DepGraph<D> {
142142
143143 // Instantiate a dependy-less red node only once for anonymous queries.
144144 let ( red_node_index, red_node_prev_index_and_color) = current. intern_node (
145- profiler,
146145 & prev_graph,
147146 DepNode { kind : D :: DEP_KIND_RED , hash : Fingerprint :: ZERO . into ( ) } ,
148147 EdgesVec :: new ( ) ,
@@ -371,13 +370,8 @@ impl<D: Deps> DepGraphData<D> {
371370 hash_result. map ( |f| dcx. with_stable_hashing_context ( |mut hcx| f ( & mut hcx, & result) ) ) ;
372371
373372 // 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) ;
381375
382376 hashing_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
383377
@@ -579,13 +573,8 @@ impl<D: Deps> DepGraph<D> {
579573 } ) ;
580574
581575 // 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) ;
589578
590579 hashing_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
591580
@@ -1087,12 +1076,6 @@ pub(super) struct CurrentDepGraph<D: Deps> {
10871076 /// debugging and only active with `debug_assertions`.
10881077 total_read_count : AtomicU64 ,
10891078 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 > ,
10961079}
10971080
10981081impl < D : Deps > CurrentDepGraph < D > {
@@ -1127,10 +1110,6 @@ impl<D: Deps> CurrentDepGraph<D> {
11271110
11281111 let new_node_count_estimate = 102 * prev_graph_node_count / 100 + 200 ;
11291112
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-
11341113 CurrentDepGraph {
11351114 encoder : Steal :: new ( GraphEncoder :: new (
11361115 encoder,
@@ -1153,7 +1132,6 @@ impl<D: Deps> CurrentDepGraph<D> {
11531132 fingerprints : Lock :: new ( IndexVec :: from_elem_n ( None , new_node_count_estimate) ) ,
11541133 total_read_count : AtomicU64 :: new ( 0 ) ,
11551134 total_duplicate_read_count : AtomicU64 :: new ( 0 ) ,
1156- node_intern_event_id,
11571135 }
11581136 }
11591137
@@ -1192,16 +1170,11 @@ impl<D: Deps> CurrentDepGraph<D> {
11921170
11931171 fn intern_node (
11941172 & self ,
1195- profiler : & SelfProfilerRef ,
11961173 prev_graph : & SerializedDepGraph ,
11971174 key : DepNode ,
11981175 edges : EdgesVec ,
11991176 fingerprint : Option < Fingerprint > ,
12001177 ) -> ( 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-
12051178 if let Some ( prev_index) = prev_graph. node_to_index_opt ( & key) {
12061179 let get_dep_node_index = |fingerprint| {
12071180 let mut prev_index_to_index = self . prev_index_to_index . lock ( ) ;
0 commit comments