[PATCH] D142556: [DebugInfo] Merge partially matching chains of inlined locations

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 07:00:01 PST 2023


dstenb added a comment.

For the RelWithDebInfo opt 8.0 binaries that was mentioned in the previous comment the number of inlined subroutine DIEs increased by ~2.8%:

  $ llvm-dwarfdump build-without/bin/opt | grep -E ':\s+DW_TAG_inlined_subroutine' | wc -l
  1726835
  $ llvm-dwarfdump build-with/bin/opt | grep -E ':\s+DW_TAG_inlined_subroutine' | wc -l
  1775581

and this is the output from llvm-dwarfdump --statistics:

  --- stats-without.txt	2023-02-03 14:53:06.328707620 +0100
  +++ stats-with.txt	2023-02-03 14:51:35.704846099 +0100
  @@ -3 +3 @@
  -  "file": "build-without/bin/opt",
  +  "file": "build-with/bin/opt",
  @@ -5,4 +5,4 @@
  -  "#functions": 175812,
  -  "#functions with location": 175360,
  -  "#inlined functions": 1726835,
  -  "#inlined functions with abstract origins": 1726835,
  +  "#functions": 177591,
  +  "#functions with location": 177139,
  +  "#inlined functions": 1775581,
  +  "#inlined functions with abstract origins": 1775581,
  @@ -10 +10 @@
  -  "#source variables": 4042638,
  +  "#source variables": 4133726,
  @@ -12 +12 @@
  -  "#call site entries": 1726835,
  +  "#call site entries": 1775581,
  @@ -15 +15 @@
  -  "sum_all_variables(#bytes in parent scope)": 325501149,
  +  "sum_all_variables(#bytes in parent scope)": 325501167,
  @@ -22 +22 @@
  -  "sum_all_local_vars(#bytes in parent scope)": 165535273,
  +  "sum_all_local_vars(#bytes in parent scope)": 165535291,
  @@ -26 +26 @@
  -  "#bytes within inlined functions": 17090162,
  +  "#bytes within inlined functions": 17532650,
  @@ -35,11 +35,11 @@
  -  "#bytes in .debug_info": 150806439,
  -  "#bytes in .debug_abbrev": 2926872,
  -  "#bytes in .debug_line": 19552340,
  -  "#bytes in .debug_str": 55235762,
  -  "#bytes in .debug_addr": 9078944,
  -  "#bytes in .debug_loclists": 26593774,
  -  "#bytes in .debug_rnglists": 7188993,
  -  "#bytes in .debug_str_offsets": 24633440,
  -  "#bytes in .debug_line_str": 113086,
  -  "#variables processed by location statistics": 2579495,
  -  "#variables with 0% of parent scope covered by DW_AT_location": 25017,
  +  "#bytes in .debug_info": 151752899,
  +  "#bytes in .debug_abbrev": 2959240,
  +  "#bytes in .debug_line": 19702676,
  +  "#bytes in .debug_str": 55419330,
  +  "#bytes in .debug_addr": 9205856,
  +  "#bytes in .debug_loclists": 26594317,
  +  "#bytes in .debug_rnglists": 7304436,
  +  "#bytes in .debug_str_offsets": 24650788,
  +  "#bytes in .debug_line_str": 113071,
  +  "#variables processed by location statistics": 2581225,
  +  "#variables with 0% of parent scope covered by DW_AT_location": 26747,
  @@ -57 +57 @@
  -  "#variables - entry values with 0% of parent scope covered by DW_AT_location": 18853,
  +  "#variables - entry values with 0% of parent scope covered by DW_AT_location": 18849,
  @@ -69,2 +69,2 @@
  -  "#params processed by location statistics": 2219749,
  -  "#params with 0% of parent scope covered by DW_AT_location": 10094,
  +  "#params processed by location statistics": 2221618,
  +  "#params with 0% of parent scope covered by DW_AT_location": 11963,
  @@ -82 +82 @@
  -  "#params - entry values with 0% of parent scope covered by DW_AT_location": 4540,
  +  "#params - entry values with 0% of parent scope covered by DW_AT_location": 4539,
  @@ -94,2 +94,2 @@
  -  "#local vars processed by location statistics": 359746,
  -  "#local vars with 0% of parent scope covered by DW_AT_location": 14923,
  +  "#local vars processed by location statistics": 359607,
  +  "#local vars with 0% of parent scope covered by DW_AT_location": 14784,
  @@ -107 +107 @@
  -  "#local vars - entry values with 0% of parent scope covered by DW_AT_location": 14313,
  +  "#local vars - entry values with 0% of parent scope covered by DW_AT_location": 14310,

The binary grew by 2 MB (0.6%):

  $ du -h build-without/bin/opt build-with/bin/opt 
  323M	build-without/bin/opt
  325M	build-with/bin/opt


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142556/new/

https://reviews.llvm.org/D142556



More information about the llvm-commits mailing list