Index: llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test +++ llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test @@ -69,7 +69,7 @@ # } # -CHECK: "version":5 +CHECK: "version":6 CHECK: "#functions":3 CHECK: "#functions with location":3 CHECK: "#inlined functions":7 Index: llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test +++ llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test @@ -64,7 +64,7 @@ # } # -CHECK: "version":5 +CHECK: "version":6 CHECK: "#functions":3 CHECK: "#functions with location":3 CHECK: "#inlined functions":8 Index: llvm/test/tools/llvm-dwarfdump/X86/statistics.ll =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/statistics.ll +++ llvm/test/tools/llvm-dwarfdump/X86/statistics.ll @@ -1,6 +1,6 @@ ; RUN: llc -O0 %s -o - -filetype=obj \ ; RUN: | llvm-dwarfdump -statistics - | FileCheck %s -; CHECK: "version":5 +; CHECK: "version":6 ; namespace test { ; extern int a; Index: llvm/test/tools/llvm-dwarfdump/X86/stats-scope-bytes-covered.s =================================================================== --- /dev/null +++ llvm/test/tools/llvm-dwarfdump/X86/stats-scope-bytes-covered.s @@ -0,0 +1,379 @@ +# RUN: llvm-mc %s --filetype=obj -triple=x86_64-unknown-linux-gnu -o - \ +# RUN: | llvm-dwarfdump --statistics - \ +# RUN: | FileCheck %s +# +# Check that coverage for variable locations which do not cover the parent +# scope is tracked separately in "sum_all_variables(#bytes in any scope)". +# +# CHECK: "version":6, +# CHECK-SAME: "sum_all_variables(#bytes in parent scope)":0, +# CHECK-SAME: "sum_all_variables(#bytes in any scope)":8, +# +# Code taken from the example in PR46575. + + .text + .file "test.ll" + .file 1 "/t.cpp" + .globl f # -- Begin function f + .p2align 4, 0x90 + .type f,@function +f: # @f +.Lfunc_begin0: + .loc 1 9 0 # t.cpp:9:0 + .cfi_startproc +# %bb.0: # %entry + pushq %rbx + .cfi_def_cfa_offset 16 + .cfi_offset %rbx, -16 + movl %edi, %ebx +.Ltmp0: + .loc 1 15 13 prologue_end # t.cpp:15:13 + callq getint +.Ltmp1: + .loc 1 10 7 # t.cpp:10:7 + testl %ebx, %ebx +.Ltmp2: + .loc 1 10 7 is_stmt 0 # t.cpp:10:7 + je .LBB0_2 +# %bb.1: # %if.then +.Ltmp3: + .loc 1 5 13 is_stmt 1 # t.cpp:5:13 + incl %eax + .loc 1 6 3 # t.cpp:6:3 + incl x(%rip) +.Ltmp4: +.LBB0_2: # %if.else + #DEBUG_VALUE: c <- $eax + .loc 1 0 0 is_stmt 0 # t.cpp:0:0 + movl %eax, %edi + popq %rbx + .cfi_def_cfa_offset 8 + jmp putint # TAILCALL +.Ltmp5: +.Lfunc_end0: + .size f, .Lfunc_end0-f + .cfi_endproc + # -- End function + .type x,@object # @x + .local x + .comm x,4,4 + .section .debug_loc,"",@progbits +.Ldebug_loc0: + .quad .Ltmp4-.Lfunc_begin0 + .quad .Ltmp5-.Lfunc_begin0 + .short 1 # Loc expr size + .byte 80 # super-register DW_OP_reg0 + .quad 0 + .quad 0 + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 14 # DW_FORM_strp + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 14 # DW_FORM_strp + .ascii "\264B" # DW_AT_GNU_pubnames + .byte 25 # DW_FORM_flag_present + .byte 17 # DW_AT_low_pc + .byte 1 # DW_FORM_addr + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 53 # DW_TAG_volatile_type + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 32 # DW_AT_inline + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 6 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 7 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 8 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 1 # DW_FORM_addr + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 9 # Abbreviation Code + .byte 11 # DW_TAG_lexical_block + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 1 # DW_FORM_addr + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 10 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 23 # DW_FORM_sec_offset + .byte 3 # DW_AT_name + .byte 14 # DW_FORM_strp + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 11 # Abbreviation Code + .byte 29 # DW_TAG_inlined_subroutine + .byte 0 # DW_CHILDREN_no + .byte 49 # DW_AT_abstract_origin + .byte 19 # DW_FORM_ref4 + .byte 17 # DW_AT_low_pc + .byte 1 # DW_FORM_addr + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 88 # DW_AT_call_file + .byte 11 # DW_FORM_data1 + .byte 89 # DW_AT_call_line + .byte 11 # DW_FORM_data1 + .byte 87 # DW_AT_call_column + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 4 # DWARF version number + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 8 # Address Size (in bytes) + .byte 1 # Abbrev [1] 0xb:0xda DW_TAG_compile_unit + .long .Linfo_string0 # DW_AT_producer + .short 12 # DW_AT_language + .long .Linfo_string1 # DW_AT_name + .long .Lline_table_start0 # DW_AT_stmt_list + .long .Linfo_string2 # DW_AT_comp_dir + # DW_AT_GNU_pubnames + .quad .Lfunc_begin0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_variable + .long .Linfo_string3 # DW_AT_name + .long 63 # DW_AT_type + # DW_AT_external + .byte 1 # DW_AT_decl_file + .byte 1 # DW_AT_decl_line + .byte 9 # DW_AT_location + .byte 3 + .quad x + .byte 3 # Abbrev [3] 0x3f:0x5 DW_TAG_volatile_type + .long 68 # DW_AT_type + .byte 4 # Abbrev [4] 0x44:0x7 DW_TAG_base_type + .long .Linfo_string4 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 5 # Abbrev [5] 0x4b:0x23 DW_TAG_subprogram + .long .Linfo_string5 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 4 # DW_AT_decl_line + # DW_AT_prototyped + .long 68 # DW_AT_type + .byte 1 # DW_AT_inline + .byte 6 # Abbrev [6] 0x57:0xb DW_TAG_formal_parameter + .long .Linfo_string6 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 4 # DW_AT_decl_line + .long 68 # DW_AT_type + .byte 7 # Abbrev [7] 0x62:0xb DW_TAG_variable + .long .Linfo_string7 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 5 # DW_AT_decl_line + .long 68 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 8 # Abbrev [8] 0x6e:0x76 DW_TAG_subprogram + .quad .Lfunc_begin0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 87 + .long .Linfo_string8 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 9 # DW_AT_decl_line + # DW_AT_prototyped + # DW_AT_external + .byte 6 # Abbrev [6] 0x83:0xb DW_TAG_formal_parameter + .long .Linfo_string10 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 9 # DW_AT_decl_line + .long 68 # DW_AT_type + .byte 9 # Abbrev [9] 0x8e:0x1d DW_TAG_lexical_block + .quad .Ltmp0 # DW_AT_low_pc + .long .Ltmp1-.Ltmp0 # DW_AT_high_pc + .byte 10 # Abbrev [10] 0x9b:0xf DW_TAG_variable + .long .Ldebug_loc0 # DW_AT_location + .long .Linfo_string9 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 15 # DW_AT_decl_line + .long 68 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 9 # Abbrev [9] 0xab:0x38 DW_TAG_lexical_block + .quad .Ltmp3 # DW_AT_low_pc + .long .Ltmp4-.Ltmp3 # DW_AT_high_pc + .byte 7 # Abbrev [7] 0xb8:0xb DW_TAG_variable + .long .Linfo_string6 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 11 # DW_AT_decl_line + .long 68 # DW_AT_type + .byte 7 # Abbrev [7] 0xc3:0xb DW_TAG_variable + .long .Linfo_string7 # DW_AT_name + .byte 1 # DW_AT_decl_file + .byte 12 # DW_AT_decl_line + .long 68 # DW_AT_type + .byte 11 # Abbrev [11] 0xce:0x14 DW_TAG_inlined_subroutine + .long 75 # DW_AT_abstract_origin + .quad .Ltmp3 # DW_AT_low_pc + .long .Ltmp4-.Ltmp3 # DW_AT_high_pc + .byte 1 # DW_AT_call_file + .byte 12 # DW_AT_call_line + .byte 13 # DW_AT_call_column + .byte 0 # End Of Children Mark + .byte 0 # End Of Children Mark + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)" # string offset=0 +.Linfo_string1: + .asciz "t.cpp" # string offset=55 +.Linfo_string2: + .asciz "/" # string offset=61 +.Linfo_string3: + .asciz "x" # string offset=63 +.Linfo_string4: + .asciz "int" # string offset=65 +.Linfo_string5: + .asciz "inlineinc" # string offset=69 +.Linfo_string6: + .asciz "a" # string offset=79 +.Linfo_string7: + .asciz "b" # string offset=81 +.Linfo_string8: + .asciz "f" # string offset=83 +.Linfo_string9: + .asciz "c" # string offset=85 +.Linfo_string10: + .asciz "p" # string offset=87 + .section .debug_pubnames,"",@progbits + .long .LpubNames_end0-.LpubNames_begin0 # Length of Public Names Info +.LpubNames_begin0: + .short 2 # DWARF Version + .long .Lcu_begin0 # Offset of Compilation Unit Info + .long 229 # Compilation Unit Length + .long 110 # DIE offset + .asciz "f" # External Name + .long 42 # DIE offset + .asciz "x" # External Name + .long 75 # DIE offset + .asciz "inlineinc" # External Name + .long 0 # End Mark +.LpubNames_end0: + .section .debug_pubtypes,"",@progbits + .long .LpubTypes_end0-.LpubTypes_begin0 # Length of Public Types Info +.LpubTypes_begin0: + .short 2 # DWARF Version + .long .Lcu_begin0 # Offset of Compilation Unit Info + .long 229 # Compilation Unit Length + .long 68 # DIE offset + .asciz "int" # External Name + .long 0 # End Mark +.LpubTypes_end0: + .ident "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)" + .section ".note.GNU-stack","",@progbits + .section .debug_line,"",@progbits +.Lline_table_start0: Index: llvm/tools/llvm-dwarfdump/Statistics.cpp =================================================================== --- llvm/tools/llvm-dwarfdump/Statistics.cpp +++ llvm/tools/llvm-dwarfdump/Statistics.cpp @@ -71,6 +71,8 @@ /// Holds accumulated global statistics about DIEs. struct GlobalStats { /// Total number of PC range bytes covered by DW_AT_locations. + unsigned TotalBytesCovered = 0; + /// Total number of parent DIE PC range bytes covered by DW_AT_Locations. unsigned ScopeBytesCovered = 0; /// Total number of PC range bytes in each variable's enclosing scope. unsigned ScopeBytes = 0; @@ -143,20 +145,20 @@ } // namespace /// Collect debug location statistics for one DIE. -static void collectLocStats(uint64_t BytesCovered, uint64_t BytesInScope, +static void collectLocStats(uint64_t ScopeBytesCovered, uint64_t BytesInScope, std::vector &VarParamLocStats, std::vector &ParamLocStats, std::vector &LocalVarLocStats, bool IsParam, bool IsLocalVar) { - auto getCoverageBucket = [BytesCovered, BytesInScope]() -> unsigned { + auto getCoverageBucket = [ScopeBytesCovered, BytesInScope]() -> unsigned { // No debug location at all for the variable. - if (BytesCovered == 0) + if (ScopeBytesCovered == 0) return 0; // Fully covered variable within its scope. - if (BytesCovered >= BytesInScope) + if (ScopeBytesCovered >= BytesInScope) return NumOfCoverageCategories - 1; // Get covered range (e.g. 20%-29%). - unsigned LocBucket = 100 * (double)BytesCovered / BytesInScope; + unsigned LocBucket = 100 * (double)ScopeBytesCovered / BytesInScope; LocBucket /= 10; return LocBucket + 1; }; @@ -198,6 +200,15 @@ return ID.str(); } +/// Return the number of bytes in the overlap of ranges A and B. +static uint64_t calculateOverlap(DWARFAddressRange A, DWARFAddressRange B) { + uint64_t Lower = std::max(A.LowPC, B.LowPC); + uint64_t Upper = std::min(A.HighPC, B.HighPC); + if (Lower >= Upper) + return 0; + return Upper - Lower; +} + /// Collect debug info quality metrics for one DIE. static void collectStatsForDie(DWARFDie Die, std::string FnPrefix, std::string VarPrefix, uint64_t BytesInScope, @@ -208,7 +219,8 @@ bool HasLoc = false; bool HasSrcLoc = false; bool HasType = false; - uint64_t BytesCovered = 0; + uint64_t TotalBytesCovered = 0; + uint64_t ScopeBytesCovered = 0; uint64_t BytesEntryValuesCovered = 0; auto &FnStats = FnStatMap[FnPrefix]; bool IsParam = Die.getTag() == dwarf::DW_TAG_formal_parameter; @@ -261,7 +273,8 @@ if (Die.find(dwarf::DW_AT_const_value)) { // This catches constant members *and* variables. HasLoc = true; - BytesCovered = BytesInScope; + ScopeBytesCovered = BytesInScope; + TotalBytesCovered = BytesInScope; } else { // Handle variables and function arguments. Expected> Loc = @@ -275,13 +288,27 @@ *Loc, [](const DWARFLocationExpression &L) { return !L.Range; }); if (Default != Loc->end()) { // Assume the entire range is covered by a single location. - BytesCovered = BytesInScope; + ScopeBytesCovered = BytesInScope; + TotalBytesCovered = BytesInScope; } else { + // Caller checks this Expected result already, it cannot fail. + auto ScopeRanges = cantFail(Die.getParent().getAddressRanges()); for (auto Entry : *Loc) { - uint64_t BytesEntryCovered = Entry.Range->HighPC - Entry.Range->LowPC; - BytesCovered += BytesEntryCovered; + TotalBytesCovered += Entry.Range->HighPC - Entry.Range->LowPC; + uint64_t ScopeBytesCoveredByEntry = 0; + // Calculate how many bytes of the parent scope this entry covers. + // FIXME: In section 2.6.2 of the DWARFv5 spec it says that "The + // address ranges defined by the bounded location descriptions of a + // location list may overlap". So in theory a variable can have + // multiple simultaneous locations, which would make this calculation + // misleading because we will count the overlapped areas + // twice. However, clang does not currently emit DWARF like this. + for (DWARFAddressRange R : ScopeRanges) { + ScopeBytesCoveredByEntry += calculateOverlap(*Entry.Range, R); + } + ScopeBytesCovered += ScopeBytesCoveredByEntry; if (IsEntryValue(Entry.Expr)) - BytesEntryValuesCovered += BytesEntryCovered; + BytesEntryValuesCovered += ScopeBytesCoveredByEntry; } } } @@ -295,11 +322,11 @@ else if (IsLocalVar) LocStats.NumVar++; - collectLocStats(BytesCovered, BytesInScope, LocStats.VarParamLocStats, + collectLocStats(ScopeBytesCovered, BytesInScope, LocStats.VarParamLocStats, LocStats.ParamLocStats, LocStats.LocalVarLocStats, IsParam, IsLocalVar); // Non debug entry values coverage statistics. - collectLocStats(BytesCovered - BytesEntryValuesCovered, BytesInScope, + collectLocStats(ScopeBytesCovered - BytesEntryValuesCovered, BytesInScope, LocStats.VarParamNonEntryValLocStats, LocStats.ParamNonEntryValLocStats, LocStats.LocalVarNonEntryValLocStats, IsParam, IsLocalVar); @@ -313,19 +340,17 @@ std::string VarID = constructDieID(Die, VarPrefix); FnStats.VarsInFunction.insert(VarID); + GlobalStats.TotalBytesCovered += TotalBytesCovered; if (BytesInScope) { - // Turns out we have a lot of ranges that extend past the lexical scope. - GlobalStats.ScopeBytesCovered += std::min(BytesInScope, BytesCovered); + GlobalStats.ScopeBytesCovered += ScopeBytesCovered; GlobalStats.ScopeBytes += BytesInScope; GlobalStats.ScopeEntryValueBytesCovered += BytesEntryValuesCovered; if (IsParam) { - GlobalStats.ParamScopeBytesCovered += - std::min(BytesInScope, BytesCovered); + GlobalStats.ParamScopeBytesCovered += ScopeBytesCovered; GlobalStats.ParamScopeBytes += BytesInScope; GlobalStats.ParamScopeEntryValueBytesCovered += BytesEntryValuesCovered; } else if (IsLocalVar) { - GlobalStats.LocalVarScopeBytesCovered += - std::min(BytesInScope, BytesCovered); + GlobalStats.LocalVarScopeBytesCovered += ScopeBytesCovered; GlobalStats.LocalVarScopeBytes += BytesInScope; GlobalStats.LocalVarScopeEntryValueBytesCovered += BytesEntryValuesCovered; @@ -540,7 +565,7 @@ /// The version number should be increased every time the algorithm is changed /// (including bug fixes). New metrics may be added without increasing the /// version. - unsigned Version = 5; + unsigned Version = 6; unsigned VarParamTotal = 0; unsigned VarParamUnique = 0; unsigned VarParamWithLoc = 0; @@ -610,7 +635,10 @@ printDatum(OS, "#call site parameter DIEs", GlobalStats.CallSiteParamDIEs); printDatum(OS, "sum_all_variables(#bytes in parent scope)", - GlobalStats.ScopeBytes); + GlobalStats.ScopeBytesCovered); + printDatum(OS, + "sum_all_variables(#bytes in any scope)", + GlobalStats.TotalBytesCovered); printDatum(OS, "sum_all_variables(#bytes in parent scope covered by " "DW_AT_location)",