@@ -175,6 +175,11 @@ pub struct PerfStats {
175175 pub decode_def_path_tables_time : Cell < Duration > ,
176176 /// Total number of values canonicalized queries constructed.
177177 pub queries_canonicalized : Cell < usize > ,
178+ /// Number of times we canonicalized a value and found that the
179+ /// result had already been canonicalized.
180+ pub canonicalized_values_allocated : Cell < usize > ,
181+ /// Number of times this query is invoked.
182+ pub normalize_projection_ty : Cell < usize > ,
178183}
179184
180185/// Enum to support dispatch of one-time diagnostics (in Session.diag_once)
@@ -862,6 +867,10 @@ impl Session {
862867 ) ;
863868 println ! ( "Total queries canonicalized: {}" ,
864869 self . perf_stats. queries_canonicalized. get( ) ) ;
870+ println ! ( "Total canonical values interned: {}" ,
871+ self . perf_stats. canonicalized_values_allocated. get( ) ) ;
872+ println ! ( "normalize_projection_ty: {}" ,
873+ self . perf_stats. normalize_projection_ty. get( ) ) ;
865874 }
866875
867876 /// We want to know if we're allowed to do an optimization for crate foo from -z fuel=foo=n.
@@ -1149,6 +1158,8 @@ pub fn build_session_(
11491158 symbol_hash_time : Cell :: new ( Duration :: from_secs ( 0 ) ) ,
11501159 decode_def_path_tables_time : Cell :: new ( Duration :: from_secs ( 0 ) ) ,
11511160 queries_canonicalized : Cell :: new ( 0 ) ,
1161+ canonicalized_values_allocated : Cell :: new ( 0 ) ,
1162+ normalize_projection_ty : Cell :: new ( 0 ) ,
11521163 } ,
11531164 code_stats : RefCell :: new ( CodeStats :: new ( ) ) ,
11541165 optimization_fuel_crate,
0 commit comments