@@ -113,7 +113,7 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> {
113
113
let mut lock = cache. borrow_mut ( ) ;
114
114
if let Some ( value) = lock. results . get ( key) {
115
115
profq_msg ! ( tcx, ProfileQueriesMsg :: CacheHit ) ;
116
- tcx. sess . profiler ( |p| p. record_query_hit ( Q :: CATEGORY ) ) ;
116
+ tcx. sess . profiler ( |p| p. record_query_hit ( Q :: NAME , Q :: CATEGORY ) ) ;
117
117
let result = Ok ( ( value. value . clone ( ) , value. index ) ) ;
118
118
#[ cfg( debug_assertions) ]
119
119
{
@@ -375,7 +375,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
375
375
376
376
if dep_node. kind . is_anon ( ) {
377
377
profq_msg ! ( self , ProfileQueriesMsg :: ProviderBegin ) ;
378
- self . sess . profiler ( |p| p. start_activity ( Q :: CATEGORY ) ) ;
378
+ self . sess . profiler ( |p| p. start_query ( Q :: NAME , Q :: CATEGORY ) ) ;
379
379
380
380
let ( ( result, dep_node_index) , diagnostics) = with_diagnostics ( |diagnostics| {
381
381
job. start ( self , diagnostics, |tcx| {
@@ -385,7 +385,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
385
385
} )
386
386
} ) ;
387
387
388
- self . sess . profiler ( |p| p. end_activity ( Q :: CATEGORY ) ) ;
388
+ self . sess . profiler ( |p| p. end_query ( Q :: NAME , Q :: CATEGORY ) ) ;
389
389
profq_msg ! ( self , ProfileQueriesMsg :: ProviderEnd ) ;
390
390
391
391
self . dep_graph . read_index ( dep_node_index) ;
@@ -452,14 +452,14 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
452
452
453
453
let result = if let Some ( result) = result {
454
454
profq_msg ! ( self , ProfileQueriesMsg :: CacheHit ) ;
455
- self . sess . profiler ( |p| p. record_query_hit ( Q :: CATEGORY ) ) ;
455
+ self . sess . profiler ( |p| p. record_query_hit ( Q :: NAME , Q :: CATEGORY ) ) ;
456
456
457
457
result
458
458
} else {
459
459
// We could not load a result from the on-disk cache, so
460
460
// recompute.
461
461
462
- self . sess . profiler ( |p| p. start_activity ( Q :: CATEGORY ) ) ;
462
+ self . sess . profiler ( |p| p. start_query ( Q :: NAME , Q :: CATEGORY ) ) ;
463
463
464
464
// The diagnostics for this query have already been
465
465
// promoted to the current session during
@@ -472,7 +472,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
472
472
} )
473
473
} ) ;
474
474
475
- self . sess . profiler ( |p| p. end_activity ( Q :: CATEGORY ) ) ;
475
+ self . sess . profiler ( |p| p. end_query ( Q :: NAME , Q :: CATEGORY ) ) ;
476
476
result
477
477
} ;
478
478
@@ -537,7 +537,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
537
537
key, dep_node) ;
538
538
539
539
profq_msg ! ( self , ProfileQueriesMsg :: ProviderBegin ) ;
540
- self . sess . profiler ( |p| p. start_activity ( Q :: CATEGORY ) ) ;
540
+ self . sess . profiler ( |p| p. start_query ( Q :: NAME , Q :: CATEGORY ) ) ;
541
541
542
542
let ( ( result, dep_node_index) , diagnostics) = with_diagnostics ( |diagnostics| {
543
543
job. start ( self , diagnostics, |tcx| {
@@ -557,7 +557,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
557
557
} )
558
558
} ) ;
559
559
560
- self . sess . profiler ( |p| p. end_activity ( Q :: CATEGORY ) ) ;
560
+ self . sess . profiler ( |p| p. end_query ( Q :: NAME , Q :: CATEGORY ) ) ;
561
561
profq_msg ! ( self , ProfileQueriesMsg :: ProviderEnd ) ;
562
562
563
563
if unlikely ! ( self . sess. opts. debugging_opts. query_dep_graph) {
@@ -600,7 +600,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
600
600
let _ = self . get_query :: < Q > ( DUMMY_SP , key) ;
601
601
} else {
602
602
profq_msg ! ( self , ProfileQueriesMsg :: CacheHit ) ;
603
- self . sess . profiler ( |p| p. record_query_hit ( Q :: CATEGORY ) ) ;
603
+ self . sess . profiler ( |p| p. record_query_hit ( Q :: NAME , Q :: CATEGORY ) ) ;
604
604
}
605
605
}
606
606
@@ -739,6 +739,7 @@ macro_rules! define_queries_inner {
739
739
sess. profiler( |p| {
740
740
$(
741
741
p. record_computed_queries(
742
+ <queries:: $name<' _> as QueryConfig <' _>>:: NAME ,
742
743
<queries:: $name<' _> as QueryConfig <' _>>:: CATEGORY ,
743
744
self . $name. lock( ) . results. len( )
744
745
) ;
0 commit comments