about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-29 11:10:56 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-08-29 14:16:53 +1000
commitf26fdce9917992f71e561cef44a52fb5bd2e6de9 (patch)
tree331391f166f46c4cde5a808e01b12b485a3cf01b /src
parent0a52fbe5366b98480dd9653ac0c0b4afaf6d6ebd (diff)
downloadrust-f26fdce9917992f71e561cef44a52fb5bd2e6de9.tar.gz
rust-f26fdce9917992f71e561cef44a52fb5bd2e6de9.zip
Improve HIR stats collector.
Adds and removes some `visit_*` methods accordingly, improving
coverage, and avoiding some double counting. Brings it in line with the
AST stats collector.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/stats/hir-stats.stderr72
1 files changed, 52 insertions, 20 deletions
diff --git a/src/test/ui/stats/hir-stats.stderr b/src/test/ui/stats/hir-stats.stderr
index 13cb140246f..78f70997555 100644
--- a/src/test/ui/stats/hir-stats.stderr
+++ b/src/test/ui/stats/hir-stats.stderr
@@ -118,28 +118,60 @@ ast-stats-2
 hir-stats HIR STATS
 hir-stats Name                Accumulated Size         Count     Item Size
 hir-stats ----------------------------------------------------------------
-hir-stats Param                     64 ( 0.7%)             2            32
-hir-stats Local                     64 ( 0.7%)             1            64
-hir-stats ForeignItem               72 ( 0.8%)             1            72
+hir-stats ForeignItemRef            24 ( 0.2%)             1            24
+hir-stats Mod                       32 ( 0.3%)             1            32
+hir-stats ExprField                 40 ( 0.4%)             1            40
+hir-stats TraitItemRef              56 ( 0.6%)             2            28
+hir-stats Param                     64 ( 0.6%)             2            32
+hir-stats Local                     64 ( 0.6%)             1            64
+hir-stats InlineAsm                 72 ( 0.7%)             1            72
+hir-stats ImplItemRef               72 ( 0.7%)             2            36
 hir-stats FieldDef                  96 ( 1.0%)             2            48
 hir-stats Arm                       96 ( 1.0%)             2            48
+hir-stats Body                      96 ( 1.0%)             3            32
 hir-stats Stmt                      96 ( 1.0%)             3            32
-hir-stats FnDecl                   120 ( 1.3%)             3            40
-hir-stats Attribute                128 ( 1.4%)             4            32
-hir-stats Lifetime                 128 ( 1.4%)             4            32
-hir-stats Variant                  160 ( 1.7%)             2            80
-hir-stats ImplItem                 176 ( 1.9%)             2            88
-hir-stats GenericBound             192 ( 2.1%)             4            48
-hir-stats TraitItem                192 ( 2.1%)             2            96
-hir-stats WherePredicate           216 ( 2.3%)             3            72
-hir-stats Block                    288 ( 3.1%)             6            48
-hir-stats QPath                    408 ( 4.4%)            17            24
-hir-stats Pat                      440 ( 4.8%)             5            88
-hir-stats Expr                     672 ( 7.3%)            12            56
-hir-stats Item                     960 (10.4%)            12            80
-hir-stats Ty                     1_152 (12.4%)            16            72
-hir-stats Path                   1_296 (14.0%)            27            48
-hir-stats PathSegment            2_240 (24.2%)            40            56
+hir-stats - Local                     32 ( 0.3%)             1
+hir-stats - Semi                      32 ( 0.3%)             1
+hir-stats - Expr                      32 ( 0.3%)             1
+hir-stats FnDecl                   120 ( 1.2%)             3            40
+hir-stats Attribute                128 ( 1.3%)             4            32
+hir-stats GenericArgs              144 ( 1.4%)             3            48
+hir-stats Variant                  160 ( 1.6%)             2            80
+hir-stats GenericArg               160 ( 1.6%)             4            40
+hir-stats - Type                      40 ( 0.4%)             1
+hir-stats - Lifetime                 120 ( 1.2%)             3
+hir-stats GenericBound             192 ( 1.9%)             4            48
+hir-stats - Trait                    192 ( 1.9%)             4
+hir-stats WherePredicate           216 ( 2.1%)             3            72
+hir-stats - BoundPredicate           216 ( 2.1%)             3
+hir-stats Block                    288 ( 2.9%)             6            48
+hir-stats GenericParam             400 ( 4.0%)             5            80
+hir-stats Pat                      440 ( 4.4%)             5            88
+hir-stats - Wild                      88 ( 0.9%)             1
+hir-stats - Struct                    88 ( 0.9%)             1
+hir-stats - Binding                  264 ( 2.6%)             3
+hir-stats Generics                 560 ( 5.5%)            10            56
+hir-stats Expr                     672 ( 6.7%)            12            56
+hir-stats - Path                      56 ( 0.6%)             1
+hir-stats - Struct                    56 ( 0.6%)             1
+hir-stats - Match                     56 ( 0.6%)             1
+hir-stats - InlineAsm                 56 ( 0.6%)             1
+hir-stats - Lit                      112 ( 1.1%)             2
+hir-stats - Block                    336 ( 3.3%)             6
+hir-stats Item                     960 ( 9.5%)            12            80
+hir-stats - Trait                     80 ( 0.8%)             1
+hir-stats - Enum                      80 ( 0.8%)             1
+hir-stats - ExternCrate               80 ( 0.8%)             1
+hir-stats - ForeignMod                80 ( 0.8%)             1
+hir-stats - Impl                      80 ( 0.8%)             1
+hir-stats - Fn                       160 ( 1.6%)             2
+hir-stats - Use                      400 ( 4.0%)             5
+hir-stats Ty                     1_080 (10.7%)            15            72
+hir-stats - Ptr                       72 ( 0.7%)             1
+hir-stats - Rptr                      72 ( 0.7%)             1
+hir-stats - Path                     936 ( 9.3%)            13
+hir-stats Path                   1_536 (15.2%)            32            48
+hir-stats PathSegment            2_240 (22.2%)            40            56
 hir-stats ----------------------------------------------------------------
-hir-stats Total                  9_256
+hir-stats Total                 10_104
 hir-stats