Index: llvm/test/tools/llvm-dwarfdump/X86/locstats.ll =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/locstats.ll +++ llvm/test/tools/llvm-dwarfdump/X86/locstats.ll @@ -2,12 +2,12 @@ ; RUN: | llvm-dwarfdump -statistics - | FileCheck %s ; ; CHECK: "entry value scope bytes covered":5 -; CHECK: "formal params scope bytes total":20 -; CHECK: "formal params scope bytes covered":20 -; CHECK: "formal params entry value scope bytes covered":5 -; CHECK: "vars scope bytes total":90 -; CHECK: "vars scope bytes covered":60 -; CHECK: "vars entry value scope bytes covered":0 +; CHECK: "params scope bytes total":20 +; CHECK: "params scope bytes covered":20 +; CHECK: "params entry value scope bytes covered":5 +; CHECK: "local vars scope bytes total":90 +; CHECK: "local vars scope bytes covered":60 +; CHECK: "local vars entry value scope bytes covered":0 ; CHECK: "total variables procesed by location statistics":6 ; CHECK: "variables with 0% of its scope covered":1 ; CHECK: "variables with (0%,10%) of its scope covered":0 @@ -58,31 +58,31 @@ ; CHECK: "params (excluding the debug entry values) with [80%,90%) of its scope covered":0 ; CHECK: "params (excluding the debug entry values) with [90%,100%) of its scope covered":0 ; CHECK: "params (excluding the debug entry values) with 100% of its scope covered":1 -; CHECK: "total vars procesed by location statistics":4 -; CHECK: "vars with 0% of its scope covered":1 -; CHECK: "vars with (0%,10%) of its scope covered":0 -; CHECK: "vars with [10%,20%) of its scope covered":0 -; CHECK: "vars with [20%,30%) of its scope covered":0 -; CHECK: "vars with [30%,40%) of its scope covered":0 -; CHECK: "vars with [40%,50%) of its scope covered":0 -; CHECK: "vars with [50%,60%) of its scope covered":1 -; CHECK: "vars with [60%,70%) of its scope covered":0 -; CHECK: "vars with [70%,80%) of its scope covered":0 -; CHECK: "vars with [80%,90%) of its scope covered":1 -; CHECK: "vars with [90%,100%) of its scope covered":0 -; CHECK: "vars with 100% of its scope covered":1 -; CHECK: "vars (excluding the debug entry values) with 0% of its scope covered":1 -; CHECK: "vars (excluding the debug entry values) with (0%,10%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with [10%,20%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with [20%,30%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with [30%,40%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with [40%,50%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with [50%,60%) of its scope covered":1 -; CHECK: "vars (excluding the debug entry values) with [60%,70%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with [70%,80%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with [80%,90%) of its scope covered":1 -; CHECK: "vars (excluding the debug entry values) with [90%,100%) of its scope covered":0 -; CHECK: "vars (excluding the debug entry values) with 100% of its scope covered":1 +; CHECK: "total local vars procesed by location statistics":4 +; CHECK: "local vars with 0% of its scope covered":1 +; CHECK: "local vars with (0%,10%) of its scope covered":0 +; CHECK: "local vars with [10%,20%) of its scope covered":0 +; CHECK: "local vars with [20%,30%) of its scope covered":0 +; CHECK: "local vars with [30%,40%) of its scope covered":0 +; CHECK: "local vars with [40%,50%) of its scope covered":0 +; CHECK: "local vars with [50%,60%) of its scope covered":1 +; CHECK: "local vars with [60%,70%) of its scope covered":0 +; CHECK: "local vars with [70%,80%) of its scope covered":0 +; CHECK: "local vars with [80%,90%) of its scope covered":1 +; CHECK: "local vars with [90%,100%) of its scope covered":0 +; CHECK: "local vars with 100% of its scope covered":1 +; CHECK: "local vars (excluding the debug entry values) with 0% of its scope covered":1 +; CHECK: "local vars (excluding the debug entry values) with (0%,10%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with [10%,20%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with [20%,30%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with [30%,40%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with [40%,50%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with [50%,60%) of its scope covered":1 +; CHECK: "local vars (excluding the debug entry values) with [60%,70%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with [70%,80%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with [80%,90%) of its scope covered":1 +; CHECK: "local vars (excluding the debug entry values) with [90%,100%) of its scope covered":0 +; CHECK: "local vars (excluding the debug entry values) with 100% of its scope covered":1 ; ; The source code of the test case: ; extern void fn3(int *); Index: llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s +++ llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s @@ -5,8 +5,8 @@ # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o %t # RUN: llvm-dwarfdump --statistics %t | FileCheck %s -# CHECK: "vars scope bytes total":12 -# CHECK: "vars scope bytes covered":8 +# CHECK: "local vars scope bytes total":12 +# CHECK: "local vars scope bytes covered":8 .text 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":4 +CHECK: "version":5 CHECK: "source functions":3 CHECK: "source functions with location":3 CHECK: "inlined functions":7 @@ -84,13 +84,13 @@ CHECK: "scope bytes covered":1160 CHECK: "total function size":594 CHECK: "total inlined function size":345 -CHECK: "total formal params":12 -CHECK: "formal params with source location":12 -CHECK: "formal params with type":12 -CHECK: "formal params with binary location":12 -CHECK: "total vars":18 -CHECK: "vars with source location":18 -CHECK: "vars with type":18 +CHECK: "total params":12 +CHECK: "params with source location":12 +CHECK: "params with type":12 +CHECK: "params with binary location":12 +CHECK: "total local vars":18 +CHECK: "local vars with source location":18 +CHECK: "local vars with type":18 # Ideally the value below would be 18, but currently it's not. -CHECK: "vars with binary location":10 +CHECK: "local vars with binary location":10 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":4 +CHECK: "version":5 CHECK: "source functions":3 CHECK: "source functions with location":3 CHECK: "inlined functions":8 @@ -79,13 +79,13 @@ CHECK: "scope bytes covered":1188 CHECK: "total function size":636 CHECK: "total inlined function size":388 -CHECK: "total formal params":13 -CHECK: "formal params with source location":13 -CHECK: "formal params with type":13 -CHECK: "formal params with binary location":13 -CHECK: "total vars":20 -CHECK: "vars with source location":20 -CHECK: "vars with type":20 +CHECK: "total params":13 +CHECK: "params with source location":13 +CHECK: "params with type":13 +CHECK: "params with binary location":13 +CHECK: "total local vars":20 +CHECK: "local vars with source location":20 +CHECK: "local vars with type":20 # Ideally the value below would be 20, but currently it's not. -CHECK: "vars with binary location":11 +CHECK: "local vars with binary location":11 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":4 +; CHECK: "version":5 ; namespace test { ; extern int a; Index: llvm/tools/llvm-dwarfdump/Statistics.cpp =================================================================== --- llvm/tools/llvm-dwarfdump/Statistics.cpp +++ llvm/tools/llvm-dwarfdump/Statistics.cpp @@ -57,14 +57,14 @@ unsigned NumParamTypes = 0; /// Number of function parameters with a DW_AT_location. unsigned NumParamLocations = 0; - /// Number of variables. - unsigned NumVars = 0; - /// Number of variables with source location. - unsigned NumVarSourceLocations = 0; - /// Number of variables with type. - unsigned NumVarTypes = 0; - /// Number of variables with DW_AT_location. - unsigned NumVarLocations = 0; + /// Number of local variables. + unsigned NumLocalVars = 0; + /// Number of local variables with source location. + unsigned NumLocalVarSourceLocations = 0; + /// Number of local variables with type. + unsigned NumLocalVarTypes = 0; + /// Number of local variables with DW_AT_location. + unsigned NumLocalVarLocations = 0; }; /// Holds accumulated global statistics about DIEs. @@ -79,21 +79,19 @@ /// Total number of PC range bytes covered by DW_AT_locations of /// formal parameters. unsigned ParamScopeBytesCovered = 0; - /// Total number of PC range bytes in each variable's enclosing scope - /// (only for parameters). + /// Total number of PC range bytes in each parameter's enclosing scope. unsigned ParamScopeBytes = 0; /// Total number of PC range bytes covered by DW_AT_locations with /// the debug entry values (DW_OP_entry_value) (only for parameters). unsigned ParamScopeEntryValueBytesCovered = 0; /// Total number of PC range bytes covered by DW_AT_locations (only for local /// variables). - unsigned VarScopeBytesCovered = 0; - /// Total number of PC range bytes in each variable's enclosing scope - /// (only for local variables). - unsigned VarScopeBytes = 0; + unsigned LocalVarScopeBytesCovered = 0; + /// Total number of PC range bytes in each local variable's enclosing scope. + unsigned LocalVarScopeBytes = 0; /// Total number of PC range bytes covered by DW_AT_locations with /// the debug entry values (DW_OP_entry_value) (only for local variables). - unsigned VarScopeEntryValueBytesCovered = 0; + unsigned LocalVarScopeEntryValueBytesCovered = 0; /// Total number of call site entries (DW_AT_call_file & DW_AT_call_line). unsigned CallSiteEntries = 0; /// Total number of call site DIEs (DW_TAG_call_site). @@ -129,10 +127,10 @@ std::vector ParamNonEntryValLocStats{ std::vector(NumOfCoverageCategories, 0)}; /// The debug location statistics for local variables. - std::vector VarLocStats{ + std::vector LocalVarLocStats{ std::vector(NumOfCoverageCategories, 0)}; /// Map non debug entry values coverage for local variables. - std::vector VarNonEntryValLocStats{ + std::vector LocalVarNonEntryValLocStats{ std::vector(NumOfCoverageCategories, 0)}; /// Total number of local variables and function parameters processed. unsigned NumVarParam = 0; @@ -146,8 +144,8 @@ static void collectLocStats(uint64_t BytesCovered, uint64_t BytesInScope, std::vector &VarParamLocStats, std::vector &ParamLocStats, - std::vector &VarLocStats, bool IsParam, - bool IsLocalVar) { + std::vector &LocalVarLocStats, + bool IsParam, bool IsLocalVar) { auto getCoverageBucket = [BytesCovered, BytesInScope]() -> unsigned { // No debug location at all for the variable. if (BytesCovered == 0) @@ -166,7 +164,7 @@ if (IsParam) ParamLocStats[CoverageBucket]++; else if (IsLocalVar) - VarLocStats[CoverageBucket]++; + LocalVarLocStats[CoverageBucket]++; } /// Construct an identifier for a given DIE from its Prefix, Name, DeclFileName /// and DeclLine. The identifier aims to be unique for any unique entities, @@ -212,7 +210,7 @@ uint64_t BytesEntryValuesCovered = 0; auto &FnStats = FnStatMap[FnPrefix]; bool IsParam = Die.getTag() == dwarf::DW_TAG_formal_parameter; - bool IsVariable = Die.getTag() == dwarf::DW_TAG_variable; + bool IsLocalVar = Die.getTag() == dwarf::DW_TAG_variable; bool IsConstantMember = Die.getTag() == dwarf::DW_TAG_member && Die.find(dwarf::DW_AT_const_value); @@ -228,13 +226,13 @@ return; } - if (!IsParam && !IsVariable && !IsConstantMember) { + if (!IsParam && !IsLocalVar && !IsConstantMember) { // Not a variable or constant member. return; } // Ignore declarations of global variables. - if (IsVariable && Die.find(dwarf::DW_AT_declaration)) + if (IsLocalVar && Die.find(dwarf::DW_AT_declaration)) return; if (Die.findRecursively(dwarf::DW_AT_decl_file) && @@ -291,17 +289,17 @@ LocStats.NumVarParam++; if (IsParam) LocStats.NumParam++; - else if (IsVariable) + else if (IsLocalVar) LocStats.NumVar++; collectLocStats(BytesCovered, BytesInScope, LocStats.VarParamLocStats, - LocStats.ParamLocStats, LocStats.VarLocStats, IsParam, - IsVariable); + LocStats.ParamLocStats, LocStats.LocalVarLocStats, IsParam, + IsLocalVar); // Non debug entry values coverage statistics. collectLocStats(BytesCovered - BytesEntryValuesCovered, BytesInScope, LocStats.VarParamNonEntryValLocStats, LocStats.ParamNonEntryValLocStats, - LocStats.VarNonEntryValLocStats, IsParam, IsVariable); + LocStats.LocalVarNonEntryValLocStats, IsParam, IsLocalVar); } // Collect PC range coverage data. @@ -322,10 +320,12 @@ std::min(BytesInScope, BytesCovered); GlobalStats.ParamScopeBytes += BytesInScope; GlobalStats.ParamScopeEntryValueBytesCovered += BytesEntryValuesCovered; - } else if (IsVariable) { - GlobalStats.VarScopeBytesCovered += std::min(BytesInScope, BytesCovered); - GlobalStats.VarScopeBytes += BytesInScope; - GlobalStats.VarScopeEntryValueBytesCovered += BytesEntryValuesCovered; + } else if (IsLocalVar) { + GlobalStats.LocalVarScopeBytesCovered += + std::min(BytesInScope, BytesCovered); + GlobalStats.LocalVarScopeBytes += BytesInScope; + GlobalStats.LocalVarScopeEntryValueBytesCovered += + BytesEntryValuesCovered; } assert(GlobalStats.ScopeBytesCovered <= GlobalStats.ScopeBytes); } @@ -350,14 +350,14 @@ FnStats.NumParamSourceLocations++; if (HasLoc) FnStats.NumParamLocations++; - } else if (IsVariable) { - FnStats.NumVars++; + } else if (IsLocalVar) { + FnStats.NumLocalVars++; if (HasType) - FnStats.NumVarTypes++; + FnStats.NumLocalVarTypes++; if (HasSrcLoc) - FnStats.NumVarSourceLocations++; + FnStats.NumLocalVarSourceLocations++; if (HasLoc) - FnStats.NumVarLocations++; + FnStats.NumLocalVarLocations++; } } @@ -528,7 +528,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 = 4; + unsigned Version = 5; unsigned VarParamTotal = 0; unsigned VarParamUnique = 0; unsigned VarParamWithLoc = 0; @@ -540,17 +540,18 @@ unsigned ParamWithType = 0; unsigned ParamWithLoc = 0; unsigned ParamWithSrcLoc = 0; - unsigned VarTotal = 0; - unsigned VarWithType = 0; - unsigned VarWithSrcLoc = 0; - unsigned VarWithLoc = 0; + unsigned LocalVarTotal = 0; + unsigned LocalVarWithType = 0; + unsigned LocalVarWithSrcLoc = 0; + unsigned LocalVarWithLoc = 0; for (auto &Entry : Statistics) { PerFunctionStats &Stats = Entry.getValue(); unsigned TotalVars = Stats.VarsInFunction.size() * (Stats.NumFnInlined + Stats.NumFnOutOfLine); // Count variables in global scope. if (!Stats.IsFunction) - TotalVars = Stats.NumVars + Stats.ConstantMembers + Stats.NumArtificial; + TotalVars = + Stats.NumLocalVars + Stats.ConstantMembers + Stats.NumArtificial; unsigned Constants = Stats.ConstantMembers; VarParamWithLoc += Stats.TotalVarWithLoc + Constants; VarParamTotal += TotalVars; @@ -566,10 +567,10 @@ ParamWithType += Stats.NumParamTypes; ParamWithLoc += Stats.NumParamLocations; ParamWithSrcLoc += Stats.NumParamSourceLocations; - VarTotal += Stats.NumVars; - VarWithType += Stats.NumVarTypes; - VarWithLoc += Stats.NumVarLocations; - VarWithSrcLoc += Stats.NumVarSourceLocations; + LocalVarTotal += Stats.NumLocalVars; + LocalVarWithType += Stats.NumLocalVarTypes; + LocalVarWithLoc += Stats.NumLocalVarLocations; + LocalVarWithSrcLoc += Stats.NumLocalVarSourceLocations; } // Print summary. @@ -577,57 +578,82 @@ OS << "{\"version\":" << Version; LLVM_DEBUG(llvm::dbgs() << "Variable location quality metrics\n"; llvm::dbgs() << "---------------------------------\n"); + printDatum(OS, "file", Filename.str()); printDatum(OS, "format", FormatName); + printDatum(OS, "source functions", NumFunctions); printDatum(OS, "source functions with location", NumFuncsWithSrcLoc); printDatum(OS, "inlined functions", NumInlinedFunctions); printDatum(OS, "inlined funcs with abstract origins", NumAbstractOrigins); + + // This includes local variables and formal parameters. printDatum(OS, "unique source variables", VarParamUnique); printDatum(OS, "source variables", VarParamTotal); printDatum(OS, "variables with location", VarParamWithLoc); + printDatum(OS, "call site entries", GlobalStats.CallSiteEntries); printDatum(OS, "call site DIEs", GlobalStats.CallSiteDIEs); printDatum(OS, "call site parameter DIEs", GlobalStats.CallSiteParamDIEs); + printDatum(OS, "scope bytes total", GlobalStats.ScopeBytes); printDatum(OS, "scope bytes covered", GlobalStats.ScopeBytesCovered); printDatum(OS, "entry value scope bytes covered", GlobalStats.ScopeEntryValueBytesCovered); - printDatum(OS, "formal params scope bytes total", + + printDatum(OS, "params scope bytes total", GlobalStats.ParamScopeBytes); - printDatum(OS, "formal params scope bytes covered", + printDatum(OS, "params scope bytes covered", GlobalStats.ParamScopeBytesCovered); - printDatum(OS, "formal params entry value scope bytes covered", + printDatum(OS, "params entry value scope bytes covered", GlobalStats.ParamScopeEntryValueBytesCovered); - printDatum(OS, "vars scope bytes total", GlobalStats.VarScopeBytes); - printDatum(OS, "vars scope bytes covered", GlobalStats.VarScopeBytesCovered); - printDatum(OS, "vars entry value scope bytes covered", - GlobalStats.VarScopeEntryValueBytesCovered); + + printDatum(OS, "local vars scope bytes total", + GlobalStats.LocalVarScopeBytes); + printDatum(OS, "local vars scope bytes covered", + GlobalStats.LocalVarScopeBytesCovered); + printDatum(OS, "local vars entry value scope bytes covered", + GlobalStats.LocalVarScopeEntryValueBytesCovered); + printDatum(OS, "total function size", GlobalStats.FunctionSize); printDatum(OS, "total inlined function size", GlobalStats.InlineFunctionSize); - printDatum(OS, "total formal params", ParamTotal); - printDatum(OS, "formal params with source location", ParamWithSrcLoc); - printDatum(OS, "formal params with type", ParamWithType); - printDatum(OS, "formal params with binary location", ParamWithLoc); - printDatum(OS, "total vars", VarTotal); - printDatum(OS, "vars with source location", VarWithSrcLoc); - printDatum(OS, "vars with type", VarWithType); - printDatum(OS, "vars with binary location", VarWithLoc); + + // Print the summary for formal parameters. + printDatum(OS, "total params", ParamTotal); + printDatum(OS, "params with source location", ParamWithSrcLoc); + printDatum(OS, "params with type", ParamWithType); + printDatum(OS, "params with binary location", ParamWithLoc); + + // Print the summary for local variables. + printDatum(OS, "total local vars", LocalVarTotal); + printDatum(OS, "local vars with source location", LocalVarWithSrcLoc); + printDatum(OS, "local vars with type", LocalVarWithType); + printDatum(OS, "local vars with binary location", LocalVarWithLoc); + + // Print the debug section sizes. + printSectionSizes(OS, Sizes); + + // Print the location statistics for variables (includes local variables + // and formal parameters). printDatum(OS, "total variables procesed by location statistics", LocStats.NumVarParam); - printSectionSizes(OS, Sizes); printLocationStats(OS, "variables", LocStats.VarParamLocStats); printLocationStats(OS, "variables (excluding the debug entry values)", LocStats.VarParamNonEntryValLocStats); + + // Print the location statistics for formal parameters. printDatum(OS, "total params procesed by location statistics", LocStats.NumParam); printLocationStats(OS, "params", LocStats.ParamLocStats); printLocationStats(OS, "params (excluding the debug entry values)", LocStats.ParamNonEntryValLocStats); - printDatum(OS, "total vars procesed by location statistics", LocStats.NumVar); - printLocationStats(OS, "vars", LocStats.VarLocStats); - printLocationStats(OS, "vars (excluding the debug entry values)", - LocStats.VarNonEntryValLocStats); + + // Print the location statistics for local variables. + printDatum(OS, "total local vars procesed by location statistics", + LocStats.NumVar); + printLocationStats(OS, "local vars", LocStats.LocalVarLocStats); + printLocationStats(OS, "local vars (excluding the debug entry values)", + LocStats.LocalVarNonEntryValLocStats); OS << "}\n"; LLVM_DEBUG( llvm::dbgs() << "Total Availability: " Index: llvm/utils/llvm-locstats/llvm-locstats.py =================================================================== --- llvm/utils/llvm-locstats/llvm-locstats.py +++ llvm/utils/llvm-locstats/llvm-locstats.py @@ -188,26 +188,28 @@ print ('error: No valid llvm-dwarfdump statistics found.') sys.exit(1) + # TODO: Parse the statistics Version from JSON. + if opts.only_variables: # Read the JSON only for local variables. variables_total_locstats = \ - json_parsed['total vars procesed by location statistics'] + json_parsed['total local vars procesed by location statistics'] variables_scope_bytes_covered = \ - json_parsed['vars scope bytes covered'] + json_parsed['local vars scope bytes covered'] variables_scope_bytes = \ - json_parsed['vars scope bytes total'] + json_parsed['local vars scope bytes total'] if not opts.ignore_debug_entry_values: for cov_bucket in coverage_buckets(): - cov_category = "vars with {} of its scope covered".format(cov_bucket) + cov_category = "local vars with {} of its scope covered".format(cov_bucket) variables_coverage_map[cov_bucket] = json_parsed[cov_category] else: variables_scope_bytes_entry_values = \ - json_parsed['vars entry value scope bytes covered'] + json_parsed['local vars entry value scope bytes covered'] variables_scope_bytes_covered = variables_scope_bytes_covered \ - variables_scope_bytes_entry_values for cov_bucket in coverage_buckets(): cov_category = \ - "vars (excluding the debug entry values) " \ + "local vars (excluding the debug entry values) " \ "with {} of its scope covered".format(cov_bucket) variables_coverage_map[cov_bucket] = json_parsed[cov_category] elif opts.only_formal_parameters: @@ -215,16 +217,16 @@ variables_total_locstats = \ json_parsed['total params procesed by location statistics'] variables_scope_bytes_covered = \ - json_parsed['formal params scope bytes covered'] + json_parsed['params scope bytes covered'] variables_scope_bytes = \ - json_parsed['formal params scope bytes total'] + json_parsed['params scope bytes total'] if not opts.ignore_debug_entry_values: for cov_bucket in coverage_buckets(): cov_category = "params with {} of its scope covered".format(cov_bucket) variables_coverage_map[cov_bucket] = json_parsed[cov_category] else: variables_scope_bytes_entry_values = \ - json_parsed['formal params entry value scope bytes covered'] + json_parsed['params entry value scope bytes covered'] variables_scope_bytes_covered = variables_scope_bytes_covered \ - variables_scope_bytes_entry_values for cov_bucket in coverage_buckets():